This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]