tree-cfg.c (verify_stmt): Print complete bogus stmt.

2008-04-09  Richard Guenther  <rguenther@suse.de>

	* 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
This commit is contained in:
Richard Guenther 2008-04-08 22:26:01 +00:00 committed by Richard Biener
parent a5e34caf3c
commit 2f9ea521e9
4 changed files with 30 additions and 14 deletions

View File

@ -1,3 +1,8 @@
2008-04-09 Richard Guenther <rguenther@suse.de>
* tree-cfg.c (verify_stmt): Print complete bogus stmt.
(dump_function_to_file): Dump function arguments with types.
2008-04-08 Richard Guenther <rguenther@suse.de>
* fold-const.c (fold_widened_comparison): Do not allow

View File

@ -1,3 +1,7 @@
2008-04-09 Richard Guenther <rguenther@suse.de>
* gfortran.dg/bind_c_usage_14.f03: Adjust.
2008-04-08 Andy Hutchinson <hutchinsonandy@aim.com>
PR target/35005

View File

@ -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

View File

@ -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, ", ");