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]

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


When flag_unit_at_a_time was set for -O2, gcc.dg/noreturn-1.c
failed in the test for warnings in line 11, since the warning
was emitted at the end of the compilation, and with line number
59 instead of 11:

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/export/home/build/sh64-elf/sh64-elf//newlib/targ-include -I/export/home/build/srcw/newlib/libc/include   -o noreturn-1.s    (timeout = 300)
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c: In function `foo5':^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c:37: warning: function declared `noreturn' has a `return' statement^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c: In function `foo1':^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c:59: warning: `noreturn' function does return^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c: In function `foo4':^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c:31: warning: function might be possible candidate for attribute `noreturn'^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c: In function `foo5':^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c:38: warning: `noreturn' function does return^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c: In function `foo8':^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c:59: warning: `noreturn' function does return^M
output is:
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c: In function `foo5':^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c:37: warning: function declared `noreturn' has a `return' statement^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c: In function `foo1':^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c:59: warning: `noreturn' function does return^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c: In function `foo4':^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c:31: warning: function might be possible candidate for attribute `noreturn'^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c: In function `foo5':^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c:38: warning: `noreturn' function does return^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c: In function `foo8':^M
/export/home/build/srcw/gcc/testsuite/gcc.dg/noreturn-1.c:59: warning: `noreturn' function does return^M

FAIL: gcc.dg/noreturn-1.c detect falling off end of noreturn (test for warnings, line 11)
PASS: gcc.dg/noreturn-1.c this function should not get any warnings (test for bogus messages, line 18)
PASS: gcc.dg/noreturn-1.c this function should not get any warnings (test for bogus messages, line 24)
PASS: gcc.dg/noreturn-1.c detect noreturn candidate (test for warnings, line 31)
PASS: gcc.dg/noreturn-1.c detect invalid return (test for warnings, line 37)
PASS: gcc.dg/noreturn-1.c detect return from noreturn (test for warnings, line 38)
PASS: gcc.dg/noreturn-1.c this function should not get any warnings (test for bogus messages, line 45)
PASS: gcc.dg/noreturn-1.c this function should not get any warnings (test for bogus messages, line 52)
PASS: gcc.dg/noreturn-1.c detect return from tail call (test for warnings, line 59)
PASS: gcc.dg/noreturn-1.c (test for excess errors)

-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658


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