summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/debug
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-10-30 09:35:42 +0000
committer <>2015-01-09 11:51:27 +0000
commitc27a97d04853380f1e80525391b3f0d156ed4c84 (patch)
tree68ffaade7c605bc80cffa18360799c98a810976f /gcc/testsuite/gcc.dg/debug
parent6af3fdec2262dd94954acc5e426ef71cbd4521d3 (diff)
downloadgcc-tarball-c27a97d04853380f1e80525391b3f0d156ed4c84.tar.gz
Imported from /home/lorry/working-area/delta_gcc-tarball/gcc-4.9.2.tar.bz2.gcc-4.9.2
Diffstat (limited to 'gcc/testsuite/gcc.dg/debug')
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug.exp2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c4
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/c99-typedef1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/const-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/const-2b.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c18
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.c8
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.h10
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char3.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-dfp.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die5.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die6.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die7.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-file1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-merge.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-uninit.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro2.c7
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp6
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/fesd-any.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/fesd-baseonly.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/fesd-none.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/fesd-reduced.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/fesd-sys.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/inline3.c5
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/omp-fesdr.c36
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr31230.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr37616.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr37726.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-5.c7
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-6.c7
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr41543.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr41695.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr43237.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c10
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/static1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/struct-loc1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/var1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/var2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr49032.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr55730.c24
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr57351.c54
68 files changed, 240 insertions, 66 deletions
diff --git a/gcc/testsuite/gcc.dg/debug/debug.exp b/gcc/testsuite/gcc.dg/debug/debug.exp
index 94c1564a2c..e25d2d2b07 100644
--- a/gcc/testsuite/gcc.dg/debug/debug.exp
+++ b/gcc/testsuite/gcc.dg/debug/debug.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c
index 8a97e4dc2a..4e40aea4ea 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c
@@ -3,7 +3,7 @@
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-require-effective-target function_sections } */
-/* { dg-options "-gdwarf-2 -ffunction-sections -w -dA" } */
+/* { dg-options "-gdwarf -ffunction-sections -w -dA" } */
/* { dg-final { scan-assembler-not "\\.Letext0-\\.Ltext0" } } */
/* { dg-final { scan-assembler-not "\\.Ltext0\[^\n\r\]*Offset 0x0" } } */
/* { dg-final { scan-assembler "DW_AT_ranges" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c
index 1d2e1481e5..3773e1c83c 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c
@@ -1,6 +1,6 @@
/* PR debug/50983 */
-/* { dg-do compile { target *-*-linux-gnu } } */
-/* { dg-options "-O0 -gdwarf-2" } */
+/* { dg-do compile { target *-*-gnu* } } */
+/* { dg-options "-O0 -gdwarf" } */
/* { dg-final { scan-assembler "is_stmt 1" } } */
int i;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/c99-typedef1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/c99-typedef1.c
index b7bd66a602..c1ca1ebb6a 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/c99-typedef1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/c99-typedef1.c
@@ -1,4 +1,4 @@
-// { dg-options "-std=iso9899:1999 -gdwarf-2" }
+// { dg-options "-std=iso9899:1999 -gdwarf" }
void f() {
int n = 3;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/const-2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/const-2.c
index 16e1d8bd14..b139122fde 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/const-2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/const-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target powerpc_altivec_ok } } */
-/* { dg-options "-O -gdwarf-2 -dA -maltivec" } */
+/* { dg-options "-O -gdwarf -dA -maltivec" } */
/* { dg-final { scan-assembler "DW_AT_const_value" } } */
typedef float FloatVect __attribute__((__vector_size__(16)));
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/const-2b.c b/gcc/testsuite/gcc.dg/debug/dwarf2/const-2b.c
index 6cbdc85b3d..e7d199d1c4 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/const-2b.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/const-2b.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target i386*-*-* } } */
-/* { dg-options "-O -gdwarf-2 -dA -msse" } */
+/* { dg-options "-O -gdwarf -dA -msse" } */
/* { dg-require-effective-target sse } */
/* { dg-final { scan-assembler "DW_AT_const_value" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c b/gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c
new file mode 100644
index 0000000000..b77f7b1bff
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c
@@ -0,0 +1,18 @@
+/* HAVE_AS_DWARF2_DEBUG_LINE macro needs to be defined to pass the unittest.
+ However, dg cannot access it, so we restrict to GNU targets. */
+/* { dg-do compile { target *-*-gnu* } } */
+/* { dg-options "-O0 -gdwarf" } */
+/* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])?\n" } } */
+/* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])? discriminator 2\n" } } */
+/* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])? discriminator 1\n" } } */
+
+int foo(int n) {
+ int i, ret = 0;
+ for (i = 0; i < n; i++) {
+ if (i % 10 == 1)
+ ret++;
+ else
+ ret--;
+ }
+ return ret;
+}
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.c
new file mode 100644
index 0000000000..d9c01d07da
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.c
@@ -0,0 +1,8 @@
+/* Test that these two options can work together. */
+/* { dg-options "-gdwarf-4 -dA -feliminate-dwarf2-dups -fdebug-types-section" } */
+/* { dg-final { scan-assembler "DW.dups_types\.h\[^)\]*. DW_TAG_typedef" } } */
+/* { dg-final { scan-assembler "DW_TAG_type_unit" } } */
+
+#include "dups-types.h"
+
+A2 a;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.h b/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.h
new file mode 100644
index 0000000000..99b7d907c0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.h
@@ -0,0 +1,10 @@
+struct A
+{
+ int i;
+ int j;
+};
+
+typedef struct A A2;
+extern A2 a;
+
+A2 f(A2);
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char1.c
index ed32349b4d..23f9596732 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char1.c
@@ -1,6 +1,6 @@
/* PR debug/7241 */
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -dA" } */
/* { dg-skip-if "Unmatchable assembly" { mmix-*-* } { "*" } { "" } } */
/* { dg-final { scan-assembler "0x\[68\]\[ \t\]+\[#@;!/|\]+\[ \t\]+DW_AT_encoding" } } */
/* { dg-final { scan-assembler-not "0x\[57\]\[ \t\]+\[#@;!/|\]+\[ \t\]+DW_AT_encoding" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char2.c
index dc145852fc..4a4bd438ce 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char2.c
@@ -1,6 +1,6 @@
/* PR debug/7241 */
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -dA" } */
/* { dg-skip-if "Unmatchable assembly" { mmix-*-* } { "*" } { "" } } */
/* { dg-final { scan-assembler "0x\[68\]\[ \t\]+\[#@;!/|\]+\[ \t\]+DW_AT_encoding" } } */
/* { dg-final { scan-assembler-not "0x\[57\]\[ \t\]+\[#@;!/|\]+\[ \t\]+DW_AT_encoding" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char3.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char3.c
index edc1d83ed4..4ff201f134 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char3.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char3.c
@@ -1,6 +1,6 @@
/* PR debug/7241 */
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -dA" } */
/* { dg-skip-if "Unmatchable assembly" { mmix-*-* } { "*" } { "" } } */
/* { dg-final { scan-assembler "0x\[68\]\[ \t\]+\[#@;!/|\]+\[ \t\]+DW_AT_encoding" } } */
/* { dg-final { scan-assembler-not "0x\[57\]\[ \t\]+\[#@;!/|\]+\[ \t\]+DW_AT_encoding" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-dfp.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-dfp.c
index ddb602250c..951380f125 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-dfp.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-dfp.c
@@ -2,7 +2,7 @@
/* { dg-do compile */
/* { dg-require-effective-target dfp } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
/* { dg-final { scan-assembler "0x10.*DW_AT_encoding" } } */
/* { dg-final { scan-assembler "0x4.*DW_AT_byte_size" } } */
/* { dg-final { scan-assembler "0x8.*DW_AT_byte_size" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die1.c
index fdfbf83215..9ca84e757b 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die1.c
@@ -1,6 +1,6 @@
/* Verify that inline function never actually inlined has no abstract DIE. */
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -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 ac897ab78c..746ab031b8 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die2.c
@@ -1,6 +1,6 @@
/* Verify that inline function never actually emit has no DIE. */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -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 04b2f36c3b..2b071fc9ed 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c
@@ -1,6 +1,6 @@
/* Verify that extern inline function never actually inlined has no abstract DIE. */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -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 3fefd41ef9..68985b71fa 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die5.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die5.c
@@ -1,6 +1,6 @@
/* Inlined inline function must have abstract DIE */
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA -fpreprocessed" } */
+/* { dg-options "-O2 -gdwarf -dA -fpreprocessed" } */
/* { dg-final { scan-assembler "3.*DW_AT_inline" } } */
#1 "test.h"
inline int t()
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die6.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die6.c
index d8f477f54e..ff0d6798df 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die6.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die6.c
@@ -1,6 +1,6 @@
/* not inline inline function must not have abstract DIE */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-inline -gdwarf-2 -dA -fpreprocessed" } */
+/* { dg-options "-O2 -fno-inline -gdwarf -dA -fpreprocessed" } */
/* { dg-final { scan-assembler-not "DW_AT_inline" } } */
#1 "test.h"
inline int t()
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die7.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die7.c
index b747076bac..88d78e2335 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die7.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die7.c
@@ -1,6 +1,6 @@
/* Inlined non-inline function must have abstract DIE */
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA -fpreprocessed" } */
+/* { dg-options "-O2 -gdwarf -dA -fpreprocessed" } */
/* { dg-final { scan-assembler "1.*DW_AT_inline" } } */
#1 "test.h"
void f(void);
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-file1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-file1.c
index c68dfe436e..b75395557b 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-file1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-file1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -dA" } */
/* { dg-final { scan-assembler "File Entry:|.file" } } */
/* Verify that a file entry is output for this file. Only systems that
do not define HAVE_AS_DWARF2_DEBUG_LINE will put out "File Entry:",
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c
index 84d605fcd0..a028d1484a 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c
@@ -1,7 +1,7 @@
/* Verify the DWARF encoding of C99 floating point types. */
/* { dg-do compile */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
/* { dg-final { scan-assembler "0x4.*DW_AT_encoding" } } */
/* { dg-final { scan-assembler "0x4.*DW_AT_byte_size" } } */
/* { dg-final { scan-assembler "0x8.*DW_AT_byte_size" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-merge.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-merge.c
index 767d38b173..15e09b116c 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-merge.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-merge.c
@@ -1,7 +1,7 @@
/* Verify that mergeable strings are used in the CU DIE. */
/* { dg-do compile } */
/* { dg-require-effective-target string_merging } */
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -dA" } */
/* { dg-final { scan-assembler "DW_AT_producer: \"GNU C" } } */
/* { dg-final { scan-assembler-not "GNU C\[^\\n\\r\]*DW_AT_producer" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-uninit.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-uninit.c
index 7bcebe355e..d871bab0c2 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-uninit.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-uninit.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -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 4efb25e8c2..fd61296b2f 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c
@@ -1,6 +1,6 @@
/* Test to make sure the mcaro info includes a start file command for the main source */
/* { dg-do compile } */
-/* { dg-options "-g3 -gdwarf-2 -dA -fverbose-asm" } */
+/* { dg-options "-g3 -gdwarf -dA -fverbose-asm" } */
/* { dg-final { scan-assembler "Start new file" } } */
#define ADD(x) (M + x)
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro2.c
new file mode 100644
index 0000000000..3dfa2908ef
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro2.c
@@ -0,0 +1,7 @@
+/* Test to make sure the macro info includes the predefined macros with line number 0. */
+/* { dg-do compile } */
+/* { dg-options "-g3 -gdwarf -dA -fverbose-asm" } */
+/* { dg-final { scan-assembler "At line number 0" } } */
+
+#define FOO 1
+int i;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp
index dfc387dbe8..a8ba0f48ef 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ load_lib gcc-dg.exp
# If a testcase doesn't have special options, use these.
global DEFAULT_CFLAGS
if ![info exists DEFAULT_CFLAGS] then {
- set DEFAULT_CFLAGS " -ansi -pedantic-errors -gdwarf-2"
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors -gdwarf"
}
# Initialize `dg'.
@@ -31,7 +31,7 @@ dg-init
# Main loop.
set comp_output [gcc_target_compile \
"$srcdir/$subdir/../trivial.c" "trivial.S" assembly \
- "additional_flags=-gdwarf-2"]
+ "additional_flags=-gdwarf"]
if { ! [string match "*: target system does not support the * debug format*" \
$comp_output] } {
remove-build-file "trivial.S"
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-any.c b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-any.c
index fc510903c2..810788ae6e 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-any.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-any.c
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-gdwarf-2 -dA -femit-struct-debug-detailed=any" }
+// { dg-options "-gdwarf -dA -femit-struct-debug-detailed=any" }
// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-baseonly.c b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-baseonly.c
index a32abb5a2e..aefcb87150 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-baseonly.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-baseonly.c
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-gdwarf-2 -dA -femit-struct-debug-baseonly" }
+// { dg-options "-gdwarf -dA -femit-struct-debug-baseonly" }
// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
// { dg-final { scan-assembler-not "tv_sec.*DW_AT_name" } }
// { dg-final { scan-assembler-not "tv_nsec.*DW_AT_name" } }
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-none.c b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-none.c
index bd218f8261..193c05d615 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-none.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-none.c
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-gdwarf-2 -dA -femit-struct-debug-detailed=none" }
+// { dg-options "-gdwarf -dA -femit-struct-debug-detailed=none" }
// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
// { dg-final { scan-assembler-not "tv_sec.*DW_AT_name" } }
// { dg-final { scan-assembler-not "tv_nsec.*DW_AT_name" } }
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-reduced.c b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-reduced.c
index ac599f43fb..ebbfc36672 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-reduced.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-reduced.c
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-gdwarf-2 -dA -femit-struct-debug-reduced" }
+// { dg-options "-gdwarf -dA -femit-struct-debug-reduced" }
// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-sys.c b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-sys.c
index 3a5c0bf146..ad0a44a95b 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-sys.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-sys.c
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-gdwarf-2 -dA -femit-struct-debug-detailed=sys" }
+// { dg-options "-gdwarf -dA -femit-struct-debug-detailed=sys" }
// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c b/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c
index 54fa58ae3f..431b429dea 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c
@@ -1,6 +1,6 @@
/*
Contributed by Dodji Seketeli <dodji@redhat.com>
- { dg-options "-g -dA -fno-merge-debug-strings" }
+ { dg-options "-gdwarf -dA -fno-merge-debug-strings" }
{ dg-do compile }
{ dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_enumeration_type" 1 } }
{ dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_enumerator" 2 } }
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c
index 11c8fad784..bd7f7b986b 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
void e(int);
__attribute__ ((always_inline)) inline int
t(int function_parameter)
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c
index 20edb588ea..b1947699e7 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c
@@ -14,7 +14,7 @@
properly nested DW_TAG_inlined_subroutine DIEs for third, second and first.
*/
-/* { dg-options "-O -g3 -dA" } */
+/* { dg-options "-O -g3 -gdwarf -dA" } */
/* { dg-do compile } */
/* There are 6 inlined subroutines:
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/inline3.c b/gcc/testsuite/gcc.dg/debug/dwarf2/inline3.c
index feafb33e82..baa2f66e8a 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/inline3.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/inline3.c
@@ -1,7 +1,7 @@
/* Verify that only one DW_AT_const_value is emitted for baz,
not for baz abstract DIE and again inside of
DW_TAG_inlined_subroutine. */
-/* { dg-options "-O2 -g -dA" } */
+/* { dg-options "-O2 -gdwarf -dA -fmerge-all-constants" } */
/* { dg-do compile } */
/* { dg-final { scan-assembler-times " DW_AT_const_value" 1 } } */
@@ -11,6 +11,9 @@ static inline long
foo (void)
{
const struct A baz = { .i = 2, .j = 21 };
+ /* We must make sure that baz isn't optimized away before inlining,
+ otherwise its initializer is also lost. */
+ const struct A *p = &baz;
asm volatile ("" : : : "memory");
return baz.i * baz.j;
}
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
index 7442dab19f..395c544185 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -dA" } */
void q(int p);
static void
t(int constant_propagated_par)
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/omp-fesdr.c b/gcc/testsuite/gcc.dg/debug/dwarf2/omp-fesdr.c
new file mode 100644
index 0000000000..d7b03192be
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/omp-fesdr.c
@@ -0,0 +1,36 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target fopenmp } */
+/* { dg-options "-g -fopenmp -gdwarf-2 -femit-struct-debug-reduced" } */
+
+struct aa
+{
+ int a;
+};
+
+int
+f7 (void)
+{
+ int v7i = 6, v7j = 7, v7k = 9, v7l = 0, v7n = 0, v7o = 1;
+
+ #pragma omp parallel
+ {
+ #pragma omp master
+ v7o++;
+ #pragma omp for private (v7i) firstprivate (v7k) reduction (+:v7l)
+ for (v7n = 0; v7n < 3; v7n++)
+ {
+ int v7m = v7j + v7k;
+ v7i = 8;
+ v7l++;
+ }
+ }
+
+ return v7i + v7j + v7k + v7l + v7n;
+}
+
+int
+main (void)
+{
+ f7 ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-1.c
index 5476aac0af..e818263a51 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-1.c
@@ -1,7 +1,7 @@
/* PR debug/29609 */
/* Verify that breakpoint on the break is hit. */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
void abort (void);
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-2.c
index 43bc54524a..463d3cc588 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-2.c
@@ -1,7 +1,7 @@
/* PR debug/29609 */
/* Verify that breakpoint on both goto failure; stmts is hit. */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
extern void abort (void);
int x;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr31230.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr31230.c
index ce26ec639c..36d55bf30f 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr31230.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr31230.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-gdwarf-2 -dA --param ggc-min-expand=0 --param ggc-min-heapsize=0" } */
+/* { dg-options "-gdwarf -dA --param ggc-min-expand=0 --param ggc-min-heapsize=0" } */
/* { dg-final { scan-assembler-times "DIE.*DW_TAG_array_type" 1 } } */
/* { dg-final { scan-assembler-times "DIE.*DW_TAG_subrange_type" 1 } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-1.c
index de90acb81b..d84ce26cae 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-1.c
@@ -1,7 +1,7 @@
/* PR debug/36690 */
/* Verify that break func is hit. */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
int i;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-2.c
index 2330f53858..0927e7465b 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-2.c
@@ -3,7 +3,7 @@
varz at that spot is defined and contains 5. Nowhere else
in the function should be varz in the scope. */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
int cnt;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-3.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-3.c
index 234ad1263b..bc492f2c14 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-3.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-3.c
@@ -1,6 +1,6 @@
/* PR debug/36690 */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
int cnt;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr37616.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr37616.c
index badff447a8..016dbc9480 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr37616.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr37616.c
@@ -2,7 +2,7 @@
/* Test that one can put breakpoints onto continue, exitlab and break
and actually see program reaching those breakpoints. */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr37726.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr37726.c
index 60fb839616..622fbcf640 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr37726.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr37726.c
@@ -1,6 +1,6 @@
/* PR debug/37726 */
/* { dg-do compile } */
-/* { dg-options "-g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-gdwarf -O0 -dA -fno-merge-debug-strings" } */
int foo (int parm)
{
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-1.c
index 452c0f6808..4e856ec094 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-1.c
@@ -2,7 +2,7 @@
/* Test that token after multi-line function-like macro use
gets correct locus even when preprocessing separately. */
/* { dg-do compile } */
-/* { dg-options "-save-temps -g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-save-temps -gdwarf -O0 -dA -fno-merge-debug-strings" } */
#define A(a,b)
int varh;A(1,
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-2.c
index d2ee408ac9..e416b0f90b 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-2.c
@@ -1,6 +1,6 @@
/* PR preprocessor/41445 */
/* { dg-do compile } */
-/* { dg-options "-g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-gdwarf -O0 -dA -fno-merge-debug-strings" } */
#include "pr41445-1.c"
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-3.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-3.c
index 2a74dc5e3d..46f57e6708 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-3.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-3.c
@@ -2,7 +2,7 @@
/* Test that token after multi-line function-like macro use
gets correct locus even when preprocessing separately. */
/* { dg-do compile } */
-/* { dg-options "-save-temps -g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-save-temps -gdwarf -O0 -dA -fno-merge-debug-strings" } */
#define A(a,b)
int varh;/*
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-4.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-4.c
index 8aa92de5dd..409f79f850 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-4.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-4.c
@@ -1,6 +1,6 @@
/* PR preprocessor/41445 */
/* { dg-do compile } */
-/* { dg-options "-g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-gdwarf -O0 -dA -fno-merge-debug-strings" } */
#include "pr41445-3.c"
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-5.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-5.c
index 03af604a7c..de5a1cc13d 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-5.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-5.c
@@ -2,13 +2,16 @@
/* Test that token after multi-line function-like macro use
gets correct locus even when preprocessing separately. */
/* { dg-do compile } */
-/* { dg-options "-save-temps -g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-save-temps -gdwarf -O0 -dA -fno-merge-debug-strings" } */
#define A(x) vari x
#define vari(x)
#define B , varj
int A(B) ;
-/* { dg-final { scan-assembler "DW_TAG_variable\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"vari\[^\\r\\n\]*DW_AT_name(\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*DW_AT_)*\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\[^0-9a-fA-FxX](0x)?7\[^0-9a-fA-FxX]\[^\\r\\n\]*DW_AT_decl_line" } } */
+/* We want to check that both vari and varj have the same line
+ number. */
+
+/* { dg-final { scan-assembler "DW_TAG_variable\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"vari\[^\\r\\n\]*DW_AT_name(\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*DW_AT_)*\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\[^0-9a-fA-FxX](0xa|10)\[^0-9a-fA-FxX]\[^\\r\\n\]*DW_AT_decl_line" } } */
/* { dg-final { scan-assembler "DW_TAG_variable\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"varj\[^\\r\\n\]*DW_AT_name(\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*DW_AT_)*\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\[^0-9a-fA-FxX](0xa|10)\[^0-9a-fA-FxX]\[^\\r\\n\]*DW_AT_decl_line" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-6.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-6.c
index 8aa37d1c1a..340cb38353 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-6.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-6.c
@@ -1,8 +1,11 @@
/* PR preprocessor/41445 */
/* { dg-do compile } */
-/* { dg-options "-g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-gdwarf -O0 -dA -fno-merge-debug-strings" } */
#include "pr41445-5.c"
-/* { dg-final { scan-assembler "DW_TAG_variable\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"vari\[^\\r\\n\]*DW_AT_name(\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*DW_AT_)*\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\[^0-9a-fA-FxX](0x)?7\[^0-9a-fA-FxX]\[^\\r\\n\]*DW_AT_decl_line" } } */
+/* We want to check that both vari and varj have the same line
+ number. */
+
+/* { dg-final { scan-assembler "DW_TAG_variable\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"vari\[^\\r\\n\]*DW_AT_name(\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*DW_AT_)*\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\[^0-9a-fA-FxX](0xa|10)?\[^0-9a-fA-FxX]\[^\\r\\n\]*DW_AT_decl_line" } } */
/* { dg-final { scan-assembler "DW_TAG_variable\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"varj\[^\\r\\n\]*DW_AT_name(\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*DW_AT_)*\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\[^0-9a-fA-FxX](0xa|10)\[^0-9a-fA-FxX]\[^\\r\\n\]*DW_AT_decl_line" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41543.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41543.c
index 02683960bd..872ed7da61 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41543.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41543.c
@@ -1,6 +1,6 @@
/* PR preprocessor/41543 */
/* { dg-do compile } */
-/* { dg-options "-save-temps -g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-save-temps -gdwarf -O0 -dA -fno-merge-debug-strings" } */
#include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41695.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41695.c
index d61b5a293f..90ae5cd888 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41695.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41695.c
@@ -1,6 +1,6 @@
/* PR debug/41695 */
/* { dg-do compile } */
-/* { dg-options "-g -O2 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-gdwarf -O2 -dA -fno-merge-debug-strings" } */
int bar (int);
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr43237.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr43237.c
index 21262c3b21..8db2543927 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr43237.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr43237.c
@@ -1,6 +1,6 @@
/* PR debug/43237 */
/* { dg-do compile } */
-/* { dg-options "-g -O2 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-gdwarf -O2 -dA -fno-merge-debug-strings" } */
struct S
{
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-1.c
index 2e4c3cda86..a859ac91a5 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-save-temps -g -dA" } */
+/* { dg-options "-save-temps -gdwarf -dA" } */
typedef struct _Harry { int dummy; } Harry_t;
Harry_t harry;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-2.c
index 13856d7aa0..dfbfa2fed1 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-save-temps -g -dA" } */
+/* { dg-options "-save-temps -gdwarf -dA" } */
typedef const struct _Harry { int dummy; } Harry_t;
Harry_t harry;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-3.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-3.c
index f1e463e45d..c8039ef6d4 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-3.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-save-temps -g -dA" } */
+/* { dg-options "-save-temps -gdwarf -dA" } */
typedef struct _Harry { int dummy; } Harry_t;
const Harry_t harry[5];
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-4.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-4.c
index cf0a2af6ce..bd2351bd90 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-4.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-save-temps -g -dA" } */
+/* { dg-options "-save-temps -gdwarf -dA" } */
typedef const struct _Harry { int dummy; } Harry_t;
Harry_t harry[10];
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c
index 957c152b4a..62b389ee93 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c
@@ -1,6 +1,6 @@
/* PR debug/51410 */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-O0 -gdwarf -dA -fno-merge-debug-strings" } */
int x;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c
new file mode 100644
index 0000000000..0ec3e84d70
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c
@@ -0,0 +1,10 @@
+/* Test that we have line information for the line
+ with local variable initializations. */
+/* { dg-options "-O0 -gdwarf -dA" } */
+/* { dg-final { scan-assembler ".loc 1 8 0|\[#/!\]\[ \t\]+line 8" } } */
+
+
+int f (register int a, register int b) {
+ register int x = b, y = a;
+ return x + y; }
+
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c b/gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c
index 7e745ff19d..4fa199c0c1 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
#define True 1
#define False 0
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/static1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/static1.c
index b9b5d0b374..bdc118ddce 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/static1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/static1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2" } */
+/* { dg-options "-O2 -gdwarf" } */
void
main(void)
{
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/struct-loc1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/struct-loc1.c
index 216a498e1a..bf893ee865 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/struct-loc1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/struct-loc1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-gdwarf -O0 -dA -fno-merge-debug-strings" } */
struct foo;
struct foo *obj;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/var1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/var1.c
index 04dd129769..297d244e2c 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/var1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/var1.c
@@ -1,6 +1,6 @@
/* PR 23190 */
/* { dg-do compile }
-/* { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-gdwarf -dA -fno-merge-debug-strings" } */
/* { dg-final { scan-assembler "xyzzy\[^\\n\\r\]+DW_AT_name" } } */
void f(void)
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/var2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/var2.c
index 8ef2a74388..72aef41809 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/var2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/var2.c
@@ -1,6 +1,6 @@
/* PR 23190 */
/* { dg-do compile }
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -dA" } */
/* { dg-final { scan-assembler "DW_OP_addr\[\\n\\r\]+\[^\\n\\r\]+foo" } } */
/* { dg-final { scan-assembler "DW_OP_addr\[\\n\\r\]+\[^\\n\\r\]+bar" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/pr49032.c b/gcc/testsuite/gcc.dg/debug/pr49032.c
index 9074c75645..3985040d71 100644
--- a/gcc/testsuite/gcc.dg/debug/pr49032.c
+++ b/gcc/testsuite/gcc.dg/debug/pr49032.c
@@ -1,7 +1,5 @@
/* PR debug/49032 */
/* { dg-do link } */
-/* Prune mips-tfile warning on alpha*-dec-osf* with -gcoff* -O*. */
-/* { dg-prune-output "warning, s not found in .*symbol tables" } */
static int s = 42;
diff --git a/gcc/testsuite/gcc.dg/debug/pr55730.c b/gcc/testsuite/gcc.dg/debug/pr55730.c
new file mode 100644
index 0000000000..073d83d759
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/pr55730.c
@@ -0,0 +1,24 @@
+/* PR debug/55730 */
+/* { dg-do compile } */
+/* { dg-options "-w" } */
+
+union U
+{
+ float f;
+ int i;
+};
+
+void
+foo (unsigned short *x, unsigned char y)
+{
+ unsigned char g;
+ union U u;
+ if (u.i < 0)
+ g = 0;
+ else
+ {
+ u.f = u.f * (255.0F / 256.0F) + 32768.0F;
+ g = (unsigned char) u.i;
+ }
+ *x = (g << 8) | y;
+}
diff --git a/gcc/testsuite/gcc.dg/debug/pr57351.c b/gcc/testsuite/gcc.dg/debug/pr57351.c
new file mode 100644
index 0000000000..972f3e9ebe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/pr57351.c
@@ -0,0 +1,54 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon } */
+/* { dg-options "-std=c99 -Os -g -march=armv7-a" } */
+/* { dg-add-options arm_neon } */
+
+typedef unsigned int size_t;
+typedef int ptrdiff_t;
+typedef signed char int8_t ;
+typedef signed long long int64_t;
+typedef int8_t GFC_INTEGER_1;
+typedef GFC_INTEGER_1 GFC_LOGICAL_1;
+typedef int64_t GFC_INTEGER_8;
+typedef GFC_INTEGER_8 GFC_LOGICAL_8;
+typedef ptrdiff_t index_type;
+typedef struct descriptor_dimension
+{
+ index_type lower_bound;
+ index_type _ubound;
+}
+descriptor_dimension;
+typedef struct { GFC_LOGICAL_1 *base_addr; size_t offset; index_type dtype; descriptor_dimension dim[7];} gfc_array_l1;
+typedef struct { GFC_LOGICAL_8 *base_addr; size_t offset; index_type dtype; descriptor_dimension dim[7];} gfc_array_l8;
+void
+all_l8 (gfc_array_l8 * const restrict retarray,
+ gfc_array_l1 * const restrict array,
+ const index_type * const restrict pdim)
+{
+ GFC_LOGICAL_8 * restrict dest;
+ index_type n;
+ index_type len;
+ index_type delta;
+ index_type dim;
+ dim = (*pdim) - 1;
+ len = ((array)->dim[dim]._ubound + 1 - (array)->dim[dim].lower_bound);
+ for (n = 0; n < dim; n++)
+ {
+ const GFC_LOGICAL_1 * restrict src;
+ GFC_LOGICAL_8 result;
+ {
+ result = 1;
+ {
+ for (n = 0; n < len; n++, src += delta)
+ {
+ if (! *src)
+ {
+ result = 0;
+ break;
+ }
+ }
+ *dest = result;
+ }
+ }
+ }
+}