PR27657 addressed a similar problem but this one is slightly different and remains unsolved:
(sid)1556:[EMAIL PROTECTED]: ~/src/a] cat test.c static void sand_window_create_shape (int test) {} static void (* const b) (int test) = sand_window_create_shape; (sid)1557:[EMAIL PROTECTED]: ~/src/a] cat main.c int main() { } (sid)1558:[EMAIL PROTECTED]: ~/src/a] make /usr/lib/gcc-snapshot/bin/gcc -c -o main.o main.c /usr/lib/gcc-snapshot/bin/gcc -c -g -O -o test.o test.c /usr/lib/gcc-snapshot/bin/gcc main.o test.o test.o:(.debug_info+0x49): undefined reference to `sand_window_create_shape' collect2: ld returned 1 exit status make: *** [all] Error 1 -- Summary: [4.2 Regression] YA bogus undefined reference error to static func with -g and -O Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tbm at cyrius dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30700