summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/debug
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-21 22:01:24 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-21 22:01:24 +0000
commitffde65b31066f17eef243be882bb89a6e19370aa (patch)
treeea876d041c0a63eefccdac5416a8678e75da4cfc /gcc/testsuite/gcc.dg/debug
parenta8c7acc4db08ce7c8ac3ddcb943f9219e2893792 (diff)
downloadgcc-ffde65b31066f17eef243be882bb89a6e19370aa.tar.gz
[.]
2015-01-21 Basile Starynkevitch <basile@starynkevitch.net> {{merged with trunk -i.e. GCC5.0 in stage4- using svn merge -r209216:219879 svn+ssh://bstarynk@gcc.gnu.org/svn/gcc/trunk but should probably have used svn merge -r209216:219879 ^/trunk we don't use svnmerge.py anymore since our svn is version 1.8.10 }} VERY UNSTABLE 2015-01-20 Basile Starynkevitch <basile@starynkevitch.net> Move previous topdir ChangeLog.MELT to ChangeLog.MELT.2008-2014 [contrib/] 2015-01-21 Basile Starynkevitch <basile@starynkevitch.net> * MELT-Plugin-Makefile: Able to make upgrade-melt as a plugin. Works for GCC 5.0. Remove GCC 4.7 old stuff. Move previous contrib/ChangeLog.MELT to ChangeLog.MELT.2008-2014 [gcc/] 2015-01-21 Basile Starynkevitch <basile@starynkevitch.net> {{merged with trunk -i.e. GCC5.0 in stage4- using svn merge -r209216:219879 svn+ssh://bstarynk@gcc.gnu.org/svn/gcc/trunk but should probably have used svn merge -r209216:219879 ^/trunk **@@@ UNSTABLE since libmelt-ana-gimple.melt not compiling, but translator painfully bootstrapping!!@@@@ }} * toplev.c: Merged manually by keeping MELT extra stuff. * toplev.h: Likewise. * gengtype.c: Add "melt-runtime.h" in list, but merged with trunk. * melt-runtime.h (MELT_VERSION_STRING): Bump to "1.2-pre-merged". (meltgc_walk_gimple_seq): Remove. (gt_ggc_mx_gimple_statement_d): Same for GCC 4.9 & 5.0 * melt-runtime.cc: Update copyright year. (ggc_alloc_cleared_melt_valuevector_st, melt_resize_scangcvect): Call ggc_internal_cleared_alloc. (melt_val2passflag): Skip TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_verify_rtl_sharing for GCC 5.0. (meltgc_walkstmt_cb, meltgc_walktree_cb) (melt_tree_walk_frame_size, meltgc_walk_gimple_seq): Remove. (melt_gt_ggc_mx_gimple_seq_d): Call gt_ggc_mx_gimple_statement_base. * melt-build-script.tpl: Update copyright year. Don't symlink meltrunsup.h anymore. * melt-build-script.sh: Regenerate. * melt/warmelt-base.melt: Update copyright year. (valdesc_object, valdesc_mapobjects, valdesc_mapstrings) (valdesc_multiple, valdesc_closure, valdesc_routine, valdesc_hook) (valdesc_bucketlongs, valdesc_jsonobject, valdesc_string) (valdesc_strbuf, valdesc_pair, valdesc_list, valdesc_int) (valdesc_double, valdesc_mixint, valdesc_mixloc) (valdesc_mixbigint, valdesc_real, valdesc_special_data): Use ggc_internal_alloc & ggc_internal_cleared_alloc for GCC 5.0. (json_canonical_name): Use ISUPPER, ISALPHA, TOUPPER instead of their standard <ctype.h> lowercase macros. * melt/warmelt-modes.melt: Update copyright year. (generate_runtypesupport_forwcopy_fun): Emit both GCC 4.9 & 5.0 compatible code. * melt/libmelt-ana-base.melt: Update copyright year. * melt/libmelt-ana-gimple.melt: TO BE IMPROVED * melt/generated/*: Painfully regenerated several times thru GCC 4.9 MELT plugin. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@219975 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/debug')
-rw-r--r--gcc/testsuite/gcc.dg/debug/20010207-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug.exp2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/atomic.c15
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp2
-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/ipa-cp1.c1
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/lang-c11-d4-strict.c7
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/lang-c11.c6
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/lang-c89.c6
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/lang-c99.c6
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/noreturn-function-attribute.c11
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/noreturn-function-keyword.c13
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/stacked-qualified-types-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/stacked-qualified-types-2.c19
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/stacked-qualified-types-3.c34
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr35154.c3
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr42767.c1
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr49522.c2
23 files changed, 154 insertions, 9 deletions
diff --git a/gcc/testsuite/gcc.dg/debug/20010207-1.c b/gcc/testsuite/gcc.dg/debug/20010207-1.c
index 513d7a43311..4dd92a88c25 100644
--- a/gcc/testsuite/gcc.dg/debug/20010207-1.c
+++ b/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 a/gcc/testsuite/gcc.dg/debug/debug-1.c b/gcc/testsuite/gcc.dg/debug/debug-1.c
index 35b5c91b1f3..d849527d211 100644
--- a/gcc/testsuite/gcc.dg/debug/debug-1.c
+++ b/gcc/testsuite/gcc.dg/debug/debug-1.c
@@ -17,8 +17,10 @@
these two instructions, removing the last use of P and xyzzy.
Everything is behaving as expected in this scenario, so we avoid
- using conditional moves for this test. */
-/* { dg-options "-dA -fno-if-conversion" { target mips*-*-* } } */
+ using conditional moves for this test.
+
+ Similar for MMIX, with the payload insns being "LDO $0,p; ZSNZ $0,$0,2". */
+/* { dg-options "-dA -fno-if-conversion" { target mips*-*-* mmix-knuth-mmixware } } */
/* { dg-final { scan-assembler "xyzzy" } } */
long p;
diff --git a/gcc/testsuite/gcc.dg/debug/debug-2.c b/gcc/testsuite/gcc.dg/debug/debug-2.c
index 1e86f2fc706..ed69994df55 100644
--- a/gcc/testsuite/gcc.dg/debug/debug-2.c
+++ b/gcc/testsuite/gcc.dg/debug/debug-2.c
@@ -2,7 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-dA" } */
/* See the comment in debug-1.c. */
-/* { dg-options "-dA -fno-if-conversion" { target mips*-*-* } } */
+/* { dg-options "-dA -fno-if-conversion" { target mips*-*-* mmix-knuth-mmixware } } */
/* { dg-final { scan-assembler "xyzzy" } } */
long p;
diff --git a/gcc/testsuite/gcc.dg/debug/debug.exp b/gcc/testsuite/gcc.dg/debug/debug.exp
index e25d2d2b072..908deb16a8d 100644
--- a/gcc/testsuite/gcc.dg/debug/debug.exp
+++ b/gcc/testsuite/gcc.dg/debug/debug.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+# Copyright (C) 2002-2015 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-2.c b/gcc/testsuite/gcc.dg/debug/dwarf2-2.c
index 0c3cee1a374..aa6778fde16 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2-2.c
+++ b/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 a/gcc/testsuite/gcc.dg/debug/dwarf2/atomic.c b/gcc/testsuite/gcc.dg/debug/dwarf2/atomic.c
new file mode 100644
index 00000000000..187e69548df
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/atomic.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -gdwarf-5 -dA" } */
+
+struct Atomics
+{
+ _Atomic(int) counter;
+ struct Pointer
+ {
+ _Atomic volatile char *p;
+ } p;
+};
+
+struct Atomics a;
+
+/* { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_atomic_type" 2 } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c
index 2b071fc9ed0..6e1d73eb34e 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 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA -fgnu89-inline" } */
/* { dg-final { scan-assembler-not "DW_AT_inline" } } */
extern inline int t()
{
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp
index a8ba0f48ef7..d17bb5ee448 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-2014 Free Software Foundation, Inc.
+# Copyright (C) 2002-2015 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/inline1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c
index bd7f7b986b3..3b4b004ef25 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 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA -fgnu89-inline" } */
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 b1947699e70..b2ae1113176 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 -gdwarf -dA" } */
+/* { dg-options "-O -g3 -gdwarf -dA -fgnu89-inline" } */
/* { dg-do compile } */
/* There are 6 inlined subroutines:
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
index 395c5441859..62a53232384 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
+++ b/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 a/gcc/testsuite/gcc.dg/debug/dwarf2/lang-c11-d4-strict.c b/gcc/testsuite/gcc.dg/debug/dwarf2/lang-c11-d4-strict.c
new file mode 100644
index 00000000000..accc13f18b5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/lang-c11-d4-strict.c
@@ -0,0 +1,7 @@
+// { dg-do compile }
+// { dg-options "-O -std=c11 -gdwarf-4 -gstrict-dwarf -dA" }
+// We cannot produce DW_LANG_C11 = 0x001d because strict-dwarf.
+// So expect DW_LANG_C99 = 0x000c
+// { dg-final { scan-assembler "0xc.*DW_AT_language" } } */
+
+int version;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/lang-c11.c b/gcc/testsuite/gcc.dg/debug/dwarf2/lang-c11.c
new file mode 100644
index 00000000000..f14c49fd3d3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/lang-c11.c
@@ -0,0 +1,6 @@
+// { dg-do compile }
+// { dg-options "-O -std=c11 -gdwarf-5 -dA" }
+// DW_LANG_C11 = 0x001d
+// { dg-final { scan-assembler "0x1d.*DW_AT_language" } } */
+
+int version;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/lang-c89.c b/gcc/testsuite/gcc.dg/debug/dwarf2/lang-c89.c
new file mode 100644
index 00000000000..6292cf8f9c9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/lang-c89.c
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-options "-O -std=c89 -g -dA" } */
+/* DW_LANG_C89 = 0x0001 */
+/* { dg-final { scan-assembler "0x1.*DW_AT_language" } } */
+
+int version;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/lang-c99.c b/gcc/testsuite/gcc.dg/debug/dwarf2/lang-c99.c
new file mode 100644
index 00000000000..d09d31636f0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/lang-c99.c
@@ -0,0 +1,6 @@
+// { dg-do compile }
+// { dg-options "-O -std=c99 -gdwarf-3 -dA" }
+// DW_LANG_C99 = 0x000c
+// { dg-final { scan-assembler "0xc.*DW_AT_language" } } */
+
+int version;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/noreturn-function-attribute.c b/gcc/testsuite/gcc.dg/debug/dwarf2/noreturn-function-attribute.c
new file mode 100644
index 00000000000..7c8924a6ca5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/noreturn-function-attribute.c
@@ -0,0 +1,11 @@
+// { dg-do compile }
+// { dg-options "-O -std=c99 -g -dA -gno-strict-dwarf" }
+// Expect DW_AT_noreturn once in .debug_info and once in .debug_abbrev
+// { dg-final { scan-assembler-times "DW_AT_noreturn" 2 } }
+
+void __attribute__ ((noreturn))
+baz (void)
+{
+ while (1) { ; }
+}
+
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/noreturn-function-keyword.c b/gcc/testsuite/gcc.dg/debug/dwarf2/noreturn-function-keyword.c
new file mode 100644
index 00000000000..ced96d19799
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/noreturn-function-keyword.c
@@ -0,0 +1,13 @@
+// { dg-do compile }
+// { dg-options "-O -std=c11 -g -dA -gno-strict-dwarf" }
+// Expect DW_AT_noreturn once in .debug_info and once in .debug_abbrev
+// { dg-final { scan-assembler-times "DW_AT_noreturn" 2 } }
+
+_Noreturn void exit (int);
+
+void exit (int i)
+{
+ while (i < 0 || i == 0 || i > 0)
+ ;
+}
+
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/stacked-qualified-types-1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/stacked-qualified-types-1.c
new file mode 100644
index 00000000000..6f40901f3a1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/stacked-qualified-types-1.c
@@ -0,0 +1,18 @@
+/* PR63300 make sure we don't duplicate type qualifiers unneeded. */
+/* { dg-do compile } */
+/* { dg-options "-gdwarf -dA" } */
+
+/* This should give us:
+ - One const type pointing to a char
+ - One volatile type pointing to a char
+ - Either one const type pointing to the volatile type pointing to a char
+ or one volatile type pointing to the const type pointing to a char.
+ But not both. */
+
+char a;
+const char b;
+volatile const char c;
+volatile char d;
+const volatile char e;
+
+/* { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_(?:const|volatile)_type" 3 } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/stacked-qualified-types-2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/stacked-qualified-types-2.c
new file mode 100644
index 00000000000..5a8d3a07aa3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/stacked-qualified-types-2.c
@@ -0,0 +1,19 @@
+/* PR63300 make sure we don't duplicate type qualifiers unneeded. */
+/* { dg-do compile } */
+/* { dg-options "-std=c99 -gdwarf-4 -dA" } */
+
+/* This should give us:
+ - One restrict type pointing to a char pointer.
+ - One volatile type pointing to the restrict type.
+ - One const type pointing to the restrict type.
+ - Either one const type pointing to the volatile type pointing to
+ the restrict type or one volatile type pointing to the const type
+ pointing to the restrict type. But not both. */
+
+char * restrict a;
+char * const restrict b;
+char * const volatile restrict c;
+char * volatile restrict d;
+
+/* { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_restrict_type" 1 } } */
+/* { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_(?:const|volatile)_type" 3 } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/stacked-qualified-types-3.c b/gcc/testsuite/gcc.dg/debug/dwarf2/stacked-qualified-types-3.c
new file mode 100644
index 00000000000..efa3fa0b1f2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/stacked-qualified-types-3.c
@@ -0,0 +1,34 @@
+/* make sure we don't duplicate type qualifiers unneeded. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -gdwarf-5 -dA" } */
+
+/* This should give us:
+ - One const type pointing to a char
+ - One volatile type pointing to a char
+ - One atomic type pointing to a char
+ - Either one const type pointing to the volatile type pointing to a char
+ or one volatile type pointing to the const type pointing to a char.
+ But not both.
+ - Either one volatile type pointing to an atomic type pointing to a char
+ or one atomic type pointing to a volatile type pointing to a char.
+ But not both.
+ - One restrict type pointing to a char pointer.
+ - One atomic type pointing to a char pointer.
+ - Either one restrict type pointing to an atomic type pointing to a char
+ pointer or one atomic type pointing to a restrict type pointing to a
+ char pointer.
+ But not both. */
+
+
+char a;
+const char b;
+volatile const char c;
+volatile char d;
+const volatile char e;
+_Atomic char f;
+_Atomic volatile char g;
+char * _Atomic restrict h;
+char * _Atomic i;
+char * restrict j;
+
+/* { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_(?:const|volatile|atomic|restrict)_type" 8 } } */
diff --git a/gcc/testsuite/gcc.dg/debug/pr35154.c b/gcc/testsuite/gcc.dg/debug/pr35154.c
index fa658be2cbe..7f6a6eaa0ec 100644
--- a/gcc/testsuite/gcc.dg/debug/pr35154.c
+++ b/gcc/testsuite/gcc.dg/debug/pr35154.c
@@ -2,6 +2,7 @@
proper structure. These should be lettered G for the struct that gives
the name to the .comm, and should be V or S for .lcomm symbols. */
+__attribute__ ((used))
static char i_outer;
struct {
char f1;
@@ -15,7 +16,7 @@ struct {
int
main()
{
- static char i_inner[2];
+ static char i_inner[2] __attribute__ ((used));
i_inner[0] = 'a'; i_inner[1] = 'b';
opta.f1 = 'c';
opta.f2 = 'd';
diff --git a/gcc/testsuite/gcc.dg/debug/pr42767.c b/gcc/testsuite/gcc.dg/debug/pr42767.c
index 1f0e25fe58e..ef7a5c33286 100644
--- a/gcc/testsuite/gcc.dg/debug/pr42767.c
+++ b/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 a/gcc/testsuite/gcc.dg/debug/pr49522.c b/gcc/testsuite/gcc.dg/debug/pr49522.c
index 3fa3bfb0e92..4a2d14d2e7c 100644
--- a/gcc/testsuite/gcc.dg/debug/pr49522.c
+++ b/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 ()
{