www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Issue 37] New: Inlining fails for functions with const parameters


             Bug #: 37
           Summary: Inlining fails for functions with const parameters
    Classification: Unclassified
           Product: GDC
           Version: development
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: Normal
         Component: gdc
        AssignedTo: ibuclaw gdcproject.org
        ReportedBy: johannespfau gmail.com

gdc/gcc fails to inline bar in this example:

 struct S
      int bar(const S s)
          return 0;
 int foo()
      S s;
      return s.bar(s);
compile with -c -O3 -finline-functions -frelease When forcing inlining, this is the error message: error: inlining failed in call to always_inline ?main.Julia!(float).ComplexStruct.squarePlusMag?: mismatched arguments Reported by jerro in the gdc newsgroup. -- Configure issuemail: http://gdcproject.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all issue changes.
Feb 19 2013