[Bug c/12281] New: [3.4 Regression]not emiting function which is static and marked as inline

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Sep 14 23:40:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12281

           Summary: [3.4 Regression]not emiting function which is static and
                    marked as inline
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: critical
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,hubicka at gcc dot gnu
                    dot org
GCC target triplet: *-*-darwin*

For some reason only on *-*-darwin (both i686 and PPC), the following program does not 
emit the function, f (note it works with -funit-at-a-time which is funny because most of the 
problems is caused by that, also it worked on 20030814 on the mainline):

static void f(void);
void g(void (*x) (void)){x();}
static inline void f(void){}
void h(){g(f);}
int main(){h();return 0;}

Note this causes bootstrap using the mainline as the base compiler to not to be able to 
complete the first stage as this is used in cppcharset.c.
It works with the c++ front-end, it also works when the program is compiled with -static 
(no -fPIC or -mdynamic-no-pic).



More information about the Gcc-bugs mailing list