diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-09-01 15:53:45 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2005-09-01 15:53:45 +0200 |
commit | ac156e917633afc778914af2a5e605678767fdba (patch) | |
tree | 7f34f422dffa7468a5b714520601c42f642bfff0 /gcc | |
parent | 355866de6545110b8e3e02b6c47447d868235e66 (diff) | |
download | gcc-ac156e917633afc778914af2a5e605678767fdba.zip gcc-ac156e917633afc778914af2a5e605678767fdba.tar.gz gcc-ac156e917633afc778914af2a5e605678767fdba.tar.bz2 |
re PR debug/7241 (DWARF encoding for "char" incorrect in gcc)
PR debug/7241
* dwarf2out.c (base_type_die): Compare char_type_node with
TYPE_MAIN_VARIANT (type), not type.
* gcc.dg/debug/dwarf2/dwarf-char1.c: New test.
* gcc.dg/debug/dwarf2/dwarf-char2.c: New test.
* gcc.dg/debug/dwarf2/dwarf-char3.c: New test.
* gcc.dg/debug/dwarf2/dwarf-die1.c: Fix a typo.
* gcc.dg/debug/dwarf2/dwarf-die2.c: Likewise.
* gcc.dg/debug/dwarf2/dwarf-die3.c: Likewise.
* gcc.dg/debug/dwarf2/dwarf-die5.c: Likewise.
* gcc.dg/debug/dwarf2/dwarf-die6.c: Likewise.
* gcc.dg/debug/dwarf2/dwarf-die7.c: Likewise.
* gcc.dg/debug/dwarf2/dwarf-uninit.c: Likewise.
* gcc.dg/debug/dwarf2/dwarf2-macro.c: Likewise.
From-SVN: r103727
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 16 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char1.c | 12 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char2.c | 12 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char3.c | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die1.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die2.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die5.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die6.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die7.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-uninit.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c | 2 |
14 files changed, 62 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 62686b0..65e2a67 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-09-01 Jakub Jelinek <jakub@redhat.com> + + PR debug/7241 + * dwarf2out.c (base_type_die): Compare char_type_node with + TYPE_MAIN_VARIANT (type), not type. + 2005-09-01 Richard Guenther <rguenther@suse.de> PR tree-optimization/15366 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 2dc03f4..a0277b2 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -8014,7 +8014,7 @@ base_type_die (tree type) that contain spaces; other names might occur by coincidence in other languages. */ if (! (TYPE_PRECISION (type) == CHAR_TYPE_SIZE - && (type == char_type_node + && (TYPE_MAIN_VARIANT (type) == char_type_node || ! strcmp (type_name, "signed char") || ! strcmp (type_name, "unsigned char")))) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 515ea5a..26c40aa 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,19 @@ +2005-09-01 Jakub Jelinek <jakub@redhat.com> + + PR debug/7241 + * gcc.dg/debug/dwarf2/dwarf-char1.c: New test. + * gcc.dg/debug/dwarf2/dwarf-char2.c: New test. + * gcc.dg/debug/dwarf2/dwarf-char3.c: New test. + + * gcc.dg/debug/dwarf2/dwarf-die1.c: Fix a typo. + * gcc.dg/debug/dwarf2/dwarf-die2.c: Likewise. + * gcc.dg/debug/dwarf2/dwarf-die3.c: Likewise. + * gcc.dg/debug/dwarf2/dwarf-die5.c: Likewise. + * gcc.dg/debug/dwarf2/dwarf-die6.c: Likewise. + * gcc.dg/debug/dwarf2/dwarf-die7.c: Likewise. + * gcc.dg/debug/dwarf2/dwarf-uninit.c: Likewise. + * gcc.dg/debug/dwarf2/dwarf2-macro.c: Likewise. + 2005-08-31 Andrew Pinski <pinskia@physics.uc.edu> PR objc/23306 diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char1.c new file mode 100644 index 0000000..53ed91a --- /dev/null +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char1.c @@ -0,0 +1,12 @@ +/* PR debug/7241 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -gdwarf-2 -dA" } */ +/* { dg-final { scan-assembler "0x\[68\]\[ \t\]# DW_AT_encoding" } } */ +/* { dg-final { scan-assembler-not "0x\[57\]\[ \t\]# DW_AT_encoding" } } */ + +char a; +const char b; +signed char c; +volatile signed char d; +unsigned char e; +volatile const unsigned char f; diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char2.c new file mode 100644 index 0000000..dd3bf93 --- /dev/null +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char2.c @@ -0,0 +1,12 @@ +/* PR debug/7241 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -gdwarf-2 -dA" } */ +/* { dg-final { scan-assembler "0x\[68\]\[ \t\]# DW_AT_encoding" } } */ +/* { dg-final { scan-assembler-not "0x\[57\]\[ \t\]# DW_AT_encoding" } } */ + +const char a; +char b; +volatile signed char c; +signed char d; +const volatile unsigned char e; +unsigned char f; diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char3.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char3.c new file mode 100644 index 0000000..d9e589a --- /dev/null +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char3.c @@ -0,0 +1,7 @@ +/* PR debug/7241 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -gdwarf-2 -dA" } */ +/* { dg-final { scan-assembler "0x\[68\]\[ \t\]# DW_AT_encoding" } } */ +/* { dg-final { scan-assembler-not "0x\[57\]\[ \t\]# DW_AT_encoding" } } */ + +const char *p = "abc"; diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die1.c index 39f0bf2..fdfbf83 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die1.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die1.c @@ -1,5 +1,5 @@ /* Verify that inline function never actually inlined has no abstract DIE. */ -/* { dg-do compile */ +/* { dg-do compile } */ /* { dg-options "-O2 -gdwarf-2 -dA" } */ /* { dg-final { scan-assembler-not "DW_AT_inline" } } */ inline int t() diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die2.c index 48bce24..ac897ab 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die2.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die2.c @@ -1,5 +1,5 @@ /* Verify that inline function never actually emit has no DIE. */ -/* { dg-do compile */ +/* { dg-do compile } */ /* { dg-options "-O0 -gdwarf-2 -dA" } */ /* { dg-final { scan-assembler-not "CIE Version" } } */ static inline int t() diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c index 34fddfa..04b2f36 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c @@ -1,5 +1,5 @@ /* Verify that extern inline function never actually inlined has no abstract DIE. */ -/* { dg-do compile */ +/* { dg-do compile } */ /* { dg-options "-O0 -gdwarf-2 -dA" } */ /* { dg-final { scan-assembler-not "DW_AT_inline" } } */ extern inline int t() diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die5.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die5.c index b3a245d..3fefd41 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die5.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die5.c @@ -1,5 +1,5 @@ /* Inlined inline function must have abstract DIE */ -/* { dg-do compile */ +/* { dg-do compile } */ /* { dg-options "-O2 -gdwarf-2 -dA -fpreprocessed" } */ /* { dg-final { scan-assembler "3.*DW_AT_inline" } } */ #1 "test.h" diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die6.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die6.c index 40cdc8d..d8f477f 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die6.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die6.c @@ -1,5 +1,5 @@ /* not inline inline function must not have abstract DIE */ -/* { dg-do compile */ +/* { dg-do compile } */ /* { dg-options "-O2 -fno-inline -gdwarf-2 -dA -fpreprocessed" } */ /* { dg-final { scan-assembler-not "DW_AT_inline" } } */ #1 "test.h" diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die7.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die7.c index d8d013a..b747076 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die7.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die7.c @@ -1,5 +1,5 @@ /* Inlined non-inline function must have abstract DIE */ -/* { dg-do compile */ +/* { dg-do compile } */ /* { dg-options "-O2 -gdwarf-2 -dA -fpreprocessed" } */ /* { dg-final { scan-assembler "1.*DW_AT_inline" } } */ #1 "test.h" diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-uninit.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-uninit.c index f0237cc..7bcebe3 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-uninit.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-uninit.c @@ -1,4 +1,4 @@ -/* { dg-do compile */ +/* { dg-do compile } */ /* { dg-options "-O2 -gdwarf-2 -dA" } */ /* { dg-final { scan-assembler "DW_TAG_variable" } } */ /* PR debug/21828 */ diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c index 45e9373..4efb25e 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c @@ -1,5 +1,5 @@ /* Test to make sure the mcaro info includes a start file command for the main source */ -/* { dg-do compile */ +/* { dg-do compile } */ /* { dg-options "-g3 -gdwarf-2 -dA -fverbose-asm" } */ /* { dg-final { scan-assembler "Start new file" } } */ |