From 2f9ea521e98580853eb89d4091e261834b4d666a Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Tue, 8 Apr 2008 22:26:01 +0000 Subject: [PATCH] tree-cfg.c (verify_stmt): Print complete bogus stmt. 2008-04-09 Richard Guenther * tree-cfg.c (verify_stmt): Print complete bogus stmt. (dump_function_to_file): Dump function arguments with types. * gfortran.dg/bind_c_usage_14.f03: Adjust. From-SVN: r134115 --- gcc/ChangeLog | 5 ++++ gcc/testsuite/ChangeLog | 4 +++ gcc/testsuite/gfortran.dg/bind_c_usage_14.f03 | 28 +++++++++---------- gcc/tree-cfg.c | 7 +++++ 4 files changed, 30 insertions(+), 14 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1151620508e..4118e9da0aa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-04-09 Richard Guenther + + * tree-cfg.c (verify_stmt): Print complete bogus stmt. + (dump_function_to_file): Dump function arguments with types. + 2008-04-08 Richard Guenther * fold-const.c (fold_widened_comparison): Do not allow diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 33597e09b20..54c058efce4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-04-09 Richard Guenther + + * gfortran.dg/bind_c_usage_14.f03: Adjust. + 2008-04-08 Andy Hutchinson PR target/35005 diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_14.f03 b/gcc/testsuite/gfortran.dg/bind_c_usage_14.f03 index abcc46e7e39..2d6726af8ba 100644 --- a/gcc/testsuite/gfortran.dg/bind_c_usage_14.f03 +++ b/gcc/testsuite/gfortran.dg/bind_c_usage_14.f03 @@ -81,24 +81,24 @@ end subroutine sub6NoIso ! The subroutines (including entry) should have ! only a char-length parameter if they are not bind(C). ! -! { dg-final { scan-tree-dump "sub1noiso .a, b, _a, _b\\)" "original" } } -! { dg-final { scan-tree-dump "sub2 .a, b\\)" "original" } } -! { dg-final { scan-tree-dump "sub3noiso .a, b, _a, _b\\)" "original" } } -! { dg-final { scan-tree-dump "sub3noisoentry .x, y, z, _x, _z\\)" "original" } } -! { dg-final { scan-tree-dump "sub4iso .a, b\\)" "original" } } -! { dg-final { scan-tree-dump "sub4isoentry .x, y, z, _x, _z\\)" "original" } } -! { dg-final { scan-tree-dump "sub5iso .a, b\\)" "original" } } -! { dg-final { scan-tree-dump "sub5noisoentry .x, y, z, _x, _z\\)" "original" } } -! { dg-final { scan-tree-dump "sub6noiso .a, b, _a, _b\\)" "original" } } -! { dg-final { scan-tree-dump "sub6isoentry .x, y, z, _x, _z\\)" "original" } } +! { dg-final { scan-tree-dump "sub1noiso \\(\[^.\]*a, \[^.\]*b, \[^.\]*_a, \[^.\]*_b\\)" "original" } } +! { dg-final { scan-tree-dump "sub2 \\(\[^.\]*a, \[^.\]*b\\)" "original" } } +! { dg-final { scan-tree-dump "sub3noiso \\(\[^.\]*a, \[^.\]*b, \[^.\]*_a, \[^.\]*_b\\)" "original" } } +! { dg-final { scan-tree-dump "sub3noisoentry \\(\[^.\]*x, \[^.\]*y, \[^.\]*z, \[^.\]*_x, \[^.\]*_z\\)" "original" } } +! { dg-final { scan-tree-dump "sub4iso \\(\[^.\]*a, \[^.\]*b\\)" "original" } } +! { dg-final { scan-tree-dump "sub4isoentry \\(\[^.\]*x, \[^.\]*y, \[^.\]*z, \[^.\]*_x, \[^.\]*_z\\)" "original" } } +! { dg-final { scan-tree-dump "sub5iso \\(\[^.\]*a, \[^.\]*b\\)" "original" } } +! { dg-final { scan-tree-dump "sub5noisoentry \\(\[^.\]*x, \[^.\]*y, \[^.\]*z, \[^.\]*_x, \[^.\]*_z\\)" "original" } } +! { dg-final { scan-tree-dump "sub6noiso \\(\[^.\]*a, \[^.\]*b, \[^.\]*_a, \[^.\]*_b\\)" "original" } } +! { dg-final { scan-tree-dump "sub6isoentry \\(\[^.\]*x, \[^.\]*y, \[^.\]*z, \[^.\]*_x, \[^.\]*_z\\)" "original" } } ! The master functions should have always a length parameter ! to ensure sharing a parameter between bind(C) and non-bind(C) works ! -! { dg-final { scan-tree-dump "master.0.sub3noiso .__entry, z, y, x, b, a, _z, _x, _b, _a\\)" "original" } } -! { dg-final { scan-tree-dump "master.1.sub4iso .__entry, z, y, x, b, a, _z, _x, _b, _a\\)" "original" } } -! { dg-final { scan-tree-dump "master.2.sub5iso .__entry, z, y, x, b, a, _z, _x, _b, _a\\)" "original" } } -! { dg-final { scan-tree-dump "master.3.sub6noiso .__entry, z, y, x, b, a, _z, _x, _b, _a\\)" "original" } } +! { dg-final { scan-tree-dump "master.0.sub3noiso \\(\[^.\]*__entry, \[^.\]*z, \[^.\]*y, \[^.\]*x, \[^.\]*b, \[^.\]*a, \[^.\]*_z, \[^.\]*_x, \[^.\]*_b, \[^.\]*_a\\)" "original" } } +! { dg-final { scan-tree-dump "master.1.sub4iso \\(\[^.\]*__entry, \[^.\]*z, \[^.\]*y, \[^.\]*x, \[^.\]*b, \[^.\]*a, \[^.\]*_z, \[^.\]*_x, \[^.\]*_b, \[^.\]*_a\\)" "original" } } +! { dg-final { scan-tree-dump "master.2.sub5iso \\(\[^.\]*__entry, \[^.\]*z, \[^.\]*y, \[^.\]*x, \[^.\]*b, \[^.\]*a, \[^.\]*_z, \[^.\]*_x, \[^.\]*_b, \[^.\]*_a\\)" "original" } } +! { dg-final { scan-tree-dump "master.3.sub6noiso \\(\[^.\]*__entry, \[^.\]*z, \[^.\]*y, \[^.\]*x, \[^.\]*b, \[^.\]*a, \[^.\]*_z, \[^.\]*_x, \[^.\]*_b, \[^.\]*_a\\)" "original" } } ! Thus, the master functions need to be called with length arguments ! present diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index cf2001faae3..5cff71f70c0 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -4181,6 +4181,11 @@ verify_stmt (tree stmt, bool last_in_block) if (addr) { debug_generic_stmt (addr); + if (addr != stmt) + { + inform ("in statement"); + debug_generic_stmt (stmt); + } return true; } @@ -6130,6 +6135,8 @@ dump_function_to_file (tree fn, FILE *file, int flags) arg = DECL_ARGUMENTS (fn); while (arg) { + print_generic_expr (file, TREE_TYPE (arg), dump_flags); + fprintf (file, " "); print_generic_expr (file, arg, dump_flags); if (TREE_CHAIN (arg)) fprintf (file, ", "); -- 2.30.2