[Issue 37] New: Inlining fails for functions with const parameters

gdc-bugzilla at gdcproject.org gdc-bugzilla at gdcproject.org
Tue Feb 19 00:33:03 PST 2013


http://gdcproject.org/bugzilla/show_bug.cgi?id=37

             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 at gdcproject.org
        ReportedBy: johannespfau at 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.


More information about the D.gnu mailing list