Description of problem: Version-Release number of selected component (if applicable): gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC) x86_64 How reproducible: 100% Steps to Reproduce: 1./usr/libexec/gcc/x86_64-redhat-linux/4.3.0/cc1 -fpreprocessed regset-x86_64.i -quiet -dumpbase regset-x86_64.c -mtune=generic -auxbase-strip libutrace_a-regset-x86_64.o -g -Wall -std=gnu99 -version -fprofile-arcs -ftest-coverage -o regset-x86_64.s 2.Look in regset-x86_64.s for "fetch". 3.See call to undefined local function symbol. Actual results: An object that can't be linked. Expected results: Correct code. Additional info: file attached
Created attachment 309006 [details] test case preprocessed C source
This has nothing to do with -fprofile-arcs or -ftest-coverage, everything to do with -O0 -std=gnu99. Small testcase: int main (void) { int i = 2; inline int bar (void) { return i; } return bar () - 2; } which works with -O0 -std=gnu99 -fgnu89-inline, or -O1 -std=gnu99, or -O0 -std=gnu89, but doesn't work with -O0 -std=gnu99. inline without extern in the misdesigned ISO C99 semantics means that external definition is not provided. Though, talking about external definitions for nested functions is weird and extern inline int bar (void) { return i; } as nested function is diagnosed as error.
Tracking upstream.