From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12010 invoked by alias); 23 Sep 2009 09:12:22 -0000 Received: (qmail 11935 invoked by uid 48); 23 Sep 2009 09:12:04 -0000 Date: Wed, 23 Sep 2009 09:12:00 -0000 Subject: [Bug preprocessor/41445] New: Debug information is wrong with and without --save-temps. X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ramana at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-09/txt/msg02145.txt.bz2 The line number information is off by 1 with and without --save-temps. I faced this problem when attempting to bootstrap using distcc and got a number of comparison failures. e200593-lin:ramrad01 675 > arm-none-linux-gnueabi-gcc -S -O2 -g t.c -o t1.s -dA e200593-lin:ramrad01 676 > arm-none-linux-gnueabi-gcc -S -O2 -g t.c -o t2.s --save-temps -dA --- t1.s 2009-09-23 10:06:25.000000000 +0100 +++ t2.s 2009-09-23 10:06:30.000000000 +0100 @@ -74,7 +74,7 @@ .uleb128 0x9 @ (DIE (0x6d) DW_TAG_member) .4byte .LASF7 @ DW_AT_name: "symtab" .byte 0x1 @ DW_AT_decl_file (t.h) - .byte 0x9 @ DW_AT_decl_line + .byte 0x8 @ DW_AT_decl_line .4byte 0x25 @ DW_AT_type .byte 0x2 @ DW_AT_data_member_location .byte 0x23 @ DW_OP_plus_uconst Consider the testcase below. e200593-lin:ramrad01 51 > cat t.c #include "t.h" struct tree_type type_decl; e200593-lin:ramrad01 > cat t.h #include "ct.h" struct tree_type GTY(()) { union tree_type_symtab { int GTY ((tag ("0"))) address; const char * GTY ((tag ("1"))) pointer; } GTY ((desc ("debug_hooks == &sdb_debug_hooks ? 1 : debug_hooks == &dwarf2_debug_hooks ? 2 : 0"), descbits ("2"))) symtab; }; e200593-lin:ramrad01> cat ct.h #define GTY(x) The line number information for the member symtab is off by 1 . It's something to do with the difference in line number information for the integrated preprocessor where the integrated preprocessor seems to think that the line number for symtab is 8 but the information from the saved pre-processed input indicates that the line number is 9. -- Summary: Debug information is wrong with and without --save- temps. Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ramana at gcc dot gnu dot org GCC build triplet: i686-linux-gnu GCC target triplet: arm-none-linux-gnueabi http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41445