Marek Polacek
2014-10-06 08:55:11 UTC
This patch is a cleanup of tests in gcc.dg/debug/ directory.
See https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02656.html for more info.
Tested on x86_64-linux: vanilla results == results with this patch ==
results with this patch and gnu11 as a default.
Applying to trunk.
2014-10-06 Marek Polacek <***@redhat.com>
* gcc.dg/debug/20010207-1.c: Use -fgnu89-inline. Fix implicit
declarations.
* gcc.dg/debug/dwarf2-2.c: Fix defaulting to int.
* gcc.dg/debug/dwarf2/ipa-cp1.c: Likewise.
* gcc.dg/debug/pr42767.c: Likewise.
* gcc.dg/debug/dwarf2/dwarf-die3.c: Use -fgnu89-inline.
* gcc.dg/debug/dwarf2/inline1.c: Likewise.
* gcc.dg/debug/dwarf2/inline2.c: Likewise.
* gcc.dg/debug/pr49522.c: Fix implicit declarations.
diff --git gcc/gcc/testsuite/gcc.dg/debug/20010207-1.c gcc/gcc/testsuite/gcc.dg/debug/20010207-1.c
index 513d7a4..4dd92a8 100644
--- gcc/gcc/testsuite/gcc.dg/debug/20010207-1.c
+++ gcc/gcc/testsuite/gcc.dg/debug/20010207-1.c
@@ -1,4 +1,6 @@
/* { dg-do compile } */
+/* { dg-options "-fgnu89-inline" } */
+int f2 (void);
extern inline int f1 (void) {return f2();}
int f3 (void) {return f1();}
int f1 (void) {return 0;}
diff --git gcc/gcc/testsuite/gcc.dg/debug/dwarf2-2.c gcc/gcc/testsuite/gcc.dg/debug/dwarf2-2.c
index 0c3cee1..aa6778f 100644
--- gcc/gcc/testsuite/gcc.dg/debug/dwarf2-2.c
+++ gcc/gcc/testsuite/gcc.dg/debug/dwarf2-2.c
@@ -8,6 +8,7 @@ inline double fx (double x)
return 3 * x;
}
+int
main ()
{
double a = 0, fx (double), foo ();
diff --git gcc/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c gcc/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c
index 2b071fc..6e1d73e 100644
--- gcc/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c
+++ gcc/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 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA -fgnu89-inline" } */
/* { dg-final { scan-assembler-not "DW_AT_inline" } } */
extern inline int t()
{
diff --git gcc/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c gcc/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c
index bd7f7b9..3b4b004 100644
--- gcc/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c
+++ gcc/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf -dA" } */
+/* { dg-options "-O0 -gdwarf -dA -fgnu89-inline" } */
void e(int);
__attribute__ ((always_inline)) inline int
t(int function_parameter)
diff --git gcc/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c gcc/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c
index b194769..b2ae111 100644
--- gcc/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c
+++ gcc/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 -gdwarf -dA" } */
+/* { dg-options "-O -g3 -gdwarf -dA -fgnu89-inline" } */
/* { dg-do compile } */
/* There are 6 inlined subroutines:
diff --git gcc/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c gcc/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
index 395c544..62a5323 100644
--- gcc/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
+++ gcc/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
@@ -17,6 +17,7 @@ t(int constant_propagated_par)
q(local_var);
q(local_var);
}
+int
main()
{
t(5);
diff --git gcc/gcc/testsuite/gcc.dg/debug/pr42767.c gcc/gcc/testsuite/gcc.dg/debug/pr42767.c
index 1f0e25f..ef7a5c3 100644
--- gcc/gcc/testsuite/gcc.dg/debug/pr42767.c
+++ gcc/gcc/testsuite/gcc.dg/debug/pr42767.c
@@ -6,6 +6,7 @@ struct lineno_cache_entry
{
unsigned long size;
};
+int
_bfd_link_section_stabs (struct lineno_cache_entry * stabsec)
{
unsigned long count;
diff --git gcc/gcc/testsuite/gcc.dg/debug/pr49522.c gcc/gcc/testsuite/gcc.dg/debug/pr49522.c
index 3fa3bfb..4a2d14d 100644
--- gcc/gcc/testsuite/gcc.dg/debug/pr49522.c
+++ gcc/gcc/testsuite/gcc.dg/debug/pr49522.c
@@ -7,6 +7,8 @@ volatile int val2 = 7L;
long long val3;
int *ptr = &val1;
+int foo (void);
+
static int
func1 ()
{
Marek
See https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02656.html for more info.
Tested on x86_64-linux: vanilla results == results with this patch ==
results with this patch and gnu11 as a default.
Applying to trunk.
2014-10-06 Marek Polacek <***@redhat.com>
* gcc.dg/debug/20010207-1.c: Use -fgnu89-inline. Fix implicit
declarations.
* gcc.dg/debug/dwarf2-2.c: Fix defaulting to int.
* gcc.dg/debug/dwarf2/ipa-cp1.c: Likewise.
* gcc.dg/debug/pr42767.c: Likewise.
* gcc.dg/debug/dwarf2/dwarf-die3.c: Use -fgnu89-inline.
* gcc.dg/debug/dwarf2/inline1.c: Likewise.
* gcc.dg/debug/dwarf2/inline2.c: Likewise.
* gcc.dg/debug/pr49522.c: Fix implicit declarations.
diff --git gcc/gcc/testsuite/gcc.dg/debug/20010207-1.c gcc/gcc/testsuite/gcc.dg/debug/20010207-1.c
index 513d7a4..4dd92a8 100644
--- gcc/gcc/testsuite/gcc.dg/debug/20010207-1.c
+++ gcc/gcc/testsuite/gcc.dg/debug/20010207-1.c
@@ -1,4 +1,6 @@
/* { dg-do compile } */
+/* { dg-options "-fgnu89-inline" } */
+int f2 (void);
extern inline int f1 (void) {return f2();}
int f3 (void) {return f1();}
int f1 (void) {return 0;}
diff --git gcc/gcc/testsuite/gcc.dg/debug/dwarf2-2.c gcc/gcc/testsuite/gcc.dg/debug/dwarf2-2.c
index 0c3cee1..aa6778f 100644
--- gcc/gcc/testsuite/gcc.dg/debug/dwarf2-2.c
+++ gcc/gcc/testsuite/gcc.dg/debug/dwarf2-2.c
@@ -8,6 +8,7 @@ inline double fx (double x)
return 3 * x;
}
+int
main ()
{
double a = 0, fx (double), foo ();
diff --git gcc/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c gcc/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c
index 2b071fc..6e1d73e 100644
--- gcc/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c
+++ gcc/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 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA -fgnu89-inline" } */
/* { dg-final { scan-assembler-not "DW_AT_inline" } } */
extern inline int t()
{
diff --git gcc/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c gcc/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c
index bd7f7b9..3b4b004 100644
--- gcc/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c
+++ gcc/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf -dA" } */
+/* { dg-options "-O0 -gdwarf -dA -fgnu89-inline" } */
void e(int);
__attribute__ ((always_inline)) inline int
t(int function_parameter)
diff --git gcc/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c gcc/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c
index b194769..b2ae111 100644
--- gcc/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c
+++ gcc/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 -gdwarf -dA" } */
+/* { dg-options "-O -g3 -gdwarf -dA -fgnu89-inline" } */
/* { dg-do compile } */
/* There are 6 inlined subroutines:
diff --git gcc/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c gcc/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
index 395c544..62a5323 100644
--- gcc/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
+++ gcc/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
@@ -17,6 +17,7 @@ t(int constant_propagated_par)
q(local_var);
q(local_var);
}
+int
main()
{
t(5);
diff --git gcc/gcc/testsuite/gcc.dg/debug/pr42767.c gcc/gcc/testsuite/gcc.dg/debug/pr42767.c
index 1f0e25f..ef7a5c3 100644
--- gcc/gcc/testsuite/gcc.dg/debug/pr42767.c
+++ gcc/gcc/testsuite/gcc.dg/debug/pr42767.c
@@ -6,6 +6,7 @@ struct lineno_cache_entry
{
unsigned long size;
};
+int
_bfd_link_section_stabs (struct lineno_cache_entry * stabsec)
{
unsigned long count;
diff --git gcc/gcc/testsuite/gcc.dg/debug/pr49522.c gcc/gcc/testsuite/gcc.dg/debug/pr49522.c
index 3fa3bfb..4a2d14d 100644
--- gcc/gcc/testsuite/gcc.dg/debug/pr49522.c
+++ gcc/gcc/testsuite/gcc.dg/debug/pr49522.c
@@ -7,6 +7,8 @@ volatile int val2 = 7L;
long long val3;
int *ptr = &val1;
+int foo (void);
+
static int
func1 ()
{
Marek