This is the mail archive of the gcc@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]

Re: unit-at-a-time option causes incorrect line numbers in warnings


> >>>>> Joern Rennecke writes:
> 
> Joern> When flag_unit_at_a_time was set for -O2, gcc.dg/noreturn-1.c
> Joern> failed in the test for warnings in line 11, since the warning
> Joern> was emitted at the end of the compilation, and with line number
> Joern> 59 instead of 11:
> 
> Joern> Executing on host: /export/home/build/sh64-elf/gcc/xgcc -B/export/home/build/sh64-elf/gcc/ /export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c   -O2 -Wmissing-noreturn -DSTACK_SIZE=16384 -S 
> 
> 	I am seeing a similar noreturn-1 failure on AIX PowerPC.

This looks like latent bug in C function deffereing code.  I am
installing the attached fix into mainline.  I think equivalent fix
should go into 3.3 as well.  OK?

Sat Feb 22 12:22:27 CET 2003  Jan Hubicka  <jh at suse dot cz>
	* c-decl.c (c_expand_body_1): Fix.
Index: c-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.364
diff -c -3 -p -r1.364 c-decl.c
*** c-decl.c	22 Feb 2003 10:02:28 -0000	1.364
--- c-decl.c	22 Feb 2003 11:22:20 -0000
*************** c_expand_body_1 (fndecl, nested_p)
*** 6523,6528 ****
--- 6523,6529 ----
    current_function_decl = fndecl;
    input_filename = DECL_SOURCE_FILE (fndecl);
    init_function_start (fndecl, input_filename, DECL_SOURCE_LINE (fndecl));
+   lineno = DECL_SOURCE_LINE (fndecl);
  
    /* This function is being processed in whole-function mode.  */
    cfun->x_whole_function_mode_p = 1;


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