diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2018-06-17 11:36:58 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2018-06-17 11:36:58 +0000 |
commit | d70ba0c10dec6968d178303709204fdde3d8892f (patch) | |
tree | 56c61211f3f65011db6e6bf06ce42a48fe05b176 /gcc/testsuite | |
parent | f6a4a25f240e79dcdbca93f613c8c6face5c1211 (diff) | |
download | gcc-d70ba0c10dec6968d178303709204fdde3d8892f.zip gcc-d70ba0c10dec6968d178303709204fdde3d8892f.tar.gz gcc-d70ba0c10dec6968d178303709204fdde3d8892f.tar.bz2 |
gimplify.c (nonlocal_vlas): Delete.
* gimplify.c (nonlocal_vlas): Delete.
(nonlocal_vla_vars): Likewise.
(gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
referenced VLAs.
(gimplify_body): Do not create and destroy nonlocal_vlas.
* tree-nested.c: Include diagnostic.h.
(use_pointer_in_frame): Tweak.
(lookup_field_for_decl): Add assertion and declare the transformation.
(convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
internal error when the reference is in a wrong context. Do not
create a debug decl by default.
(note_nonlocal_block_vlas): Delete.
(convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
(convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
create a debug decl by default.
(convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
call is in a wrong context.
(fixup_vla_decls): New function.
(finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
debug variables were created.
* tree.c (decl_value_expr_lookup): Add checking assertion.
(decl_value_expr_insert): Likewise.
fortran/
* fortran/trans-decl.c (nonlocal_dummy_decl_pset): Delete.
(nonlocal_dummy_decls): Likewise.
(gfc_nonlocal_dummy_array_decl): Likewise.
(gfc_get_symbol_decl): Do not call gfc_nonlocal_dummy_array_decl.
(gfc_get_fake_result_decl): Do not generate a new DECL if simply
reusing the result of a recursive call.
(gfc_generate_function_code): Do not create, insert and destroy
nonlocal_dummy_decls.
From-SVN: r261687
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/dwarf2/pr37726.c | 25 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/guality/pr37726.c | 27 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/stack_usage5.adb | 15 |
4 files changed, 48 insertions, 25 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1b6e062..dfb167b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2018-06-17 Eric Botcazou <ebotcazou@adacore.com> + + * gcc.dg/debug/dwarf2/pr37726.c: Move to... + * gcc.dg/guality/pr37726.c: ...here and turn into GDB test. + * gnat.dg/stack_usage5.adb: New test. + 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org> PR middle-end/82479 diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr37726.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr37726.c deleted file mode 100644 index 622fbcf..0000000 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr37726.c +++ /dev/null @@ -1,25 +0,0 @@ -/* PR debug/37726 */ -/* { dg-do compile } */ -/* { dg-options "-gdwarf -O0 -dA -fno-merge-debug-strings" } */ - -int foo (int parm) -{ - int var = 0; - int bar (void) - { - return parm + var; - } - parm++; - var++; - return bar (); -} - -int -main (void) -{ - return foo (4) - 6; -} - -/* Both parm and var variables should be in debug info for both foo and bar. */ -/* { dg-final { scan-assembler-times "\"parm\[^\n\]*\"\[^\n\]*DW_AT_name" 2 } } */ -/* { dg-final { scan-assembler-times "\"var\[^\n\]*\"\[^\n\]*DW_AT_name" 2 } } */ diff --git a/gcc/testsuite/gcc.dg/guality/pr37726.c b/gcc/testsuite/gcc.dg/guality/pr37726.c new file mode 100644 index 0000000..509d2d4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/guality/pr37726.c @@ -0,0 +1,27 @@ +/* PR debug/37726 */ +/* { dg-do run } */ +/* { dg-options "-g" } */ +/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */ + +int foo (int parm) +{ + int var = 0; + int bar (void) + { + return parm + var; /* BREAK */ + } + parm++; /* BREAK */ + var++; + return bar (); +} + +int +main (void) +{ + return foo (4) - 6; +} + +/* { dg-final { gdb-test 11 "parm" "5" } } */ +/* { dg-final { gdb-test 11 "var" "1" } } */ +/* { dg-final { gdb-test 13 "parm" "4" } } */ +/* { dg-final { gdb-test 13 "var" "0" } } */ diff --git a/gcc/testsuite/gnat.dg/stack_usage5.adb b/gcc/testsuite/gnat.dg/stack_usage5.adb new file mode 100644 index 0000000..55d0f13 --- /dev/null +++ b/gcc/testsuite/gnat.dg/stack_usage5.adb @@ -0,0 +1,15 @@ +-- { dg-do compile } +-- { dg-options "-Wstack-usage=512" } + +procedure Stack_Usage5 (C : Character) is + + S : String (1 .. 300); + + procedure Set is + begin + S (1) := C; + end; + +begin + Set; +end; |