Bug 39812 - [4.5 regression] Revision 146314 failed 8 gnat.dg tests
Summary: [4.5 regression] Revision 146314 failed 8 gnat.dg tests
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: 4.5.0
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2009-04-19 09:35 UTC by Laurent GUERBY
Modified: 2009-04-20 08:33 UTC (History)
6 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2009-04-19 15:40:42


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent GUERBY 2009-04-19 09:35:04 UTC
Between:

146303 => http://gcc.gnu.org/ml/gcc-testresults/2009-04/msg01859.html
146339 => http://gcc.gnu.org/ml/gcc-testresults/2009-04/msg01961.html

The following tests started failing on the -m32 run:

FAIL: gcc.target/i386/cleanup-1.c execution test

FAIL: gnat.dg/aliased_prefix_accessibility.adb execution test
FAIL: gnat.dg/conv_bug.adb execution test
FAIL: gnat.dg/curr_task.adb execution test
FAIL: gnat.dg/iprot_test.adb execution test
FAIL: gnat.dg/missing_acc_check.adb execution test
FAIL: gnat.dg/not_null.adb execution test
FAIL: gnat.dg/test_enum_io.adb execution test
FAIL: gnat.dg/test_overflow_sum.adb execution test
Comment 1 Laurent GUERBY 2009-04-19 12:37:18 UTC
r146313 works and r146314 fails the 8 gnat.dg tests:

r146314 | rguenth | 2009-04-18 15:02:00 +0200 (Sat, 18 Apr 2009) | 11 lines

2009-04-18  Richard Guenther  <rguenther@suse.de>

        PR middle-end/39804
        * tree-ssa-ccp.c (fold_stmt_1): New function factored from ...
        (fold_stmt): ... this and ...
        (fold_stmt_inplace): ... this.
        (fold_stmt_1): Fold references in calls and asms.
        * tree-cfg.c (remove_useless_stmts_cond): Use fold_stmt.

        * gcc.target/i386/pr39804.c: New testcase.

Comment 2 H.J. Lu 2009-04-19 15:37:22 UTC
*** Bug 39816 has been marked as a duplicate of this bug. ***
Comment 3 H.J. Lu 2009-04-19 15:40:42 UTC
This is caused by revision 146322:

http://gcc.gnu.org/ml/gcc-cvs/2009-04/msg00959.html

I also saw

FAIL: gcc.target/i386/cleanup-2.c execution test

on Linux/Intel64.
Comment 4 H.J. Lu 2009-04-19 15:43:20 UTC
Apparently, there are 2 bugs. I will reopen 39816 for gcc.target/i386/cleanup-1.c.
Comment 5 Richard Biener 2009-04-19 19:49:46 UTC
Any hint on what happens?  My Ada skills are rather weak.
Comment 6 Richard Biener 2009-04-19 20:37:14 UTC
Works for me on i686-linux.
Comment 7 Laurent GUERBY 2009-04-19 20:49:43 UTC
For me with -m32:

146313: OK
146314: FAIL
146322: OK

I'm rebuilding 146313 and 146314 and try to diff what changes
Comment 8 Laurent GUERBY 2009-04-20 00:07:42 UTC
I made a procedural mistake above, the right FAIL point is:

146321: OK
146322: FAIL

diff:

+2009-04-18  Jan Hubicka  <jh@suse.cz>
+
+	* cgraph.c (cgraph_make_edge, dump_cgraph_node, cgraph_set_call_stmt):
+	Set nothrow flag.
+	* cgraph.h (struct function): Reduce loop_nest to 30 bits; add
+	can_throw_external flag.
+	* ipa-reference.c (ipa_utils_reduced_inorder): Update call.
+	* ipa-pure-const.c (ignore_edge): New function.
+	(propagate): Compute order for NOTHROW computation; set NOTHROWs
+	only over can_throw_external edges.
+	(local_pure_const): Add nothrow flag.
+	* ipa-utils.c (searchc): Add ignore_edge callback.
+	(ipa_utils_reduced_inorder): Add ignore_edge callback.
+	* ipa-utils.h (ipa_utils_reduced_inorder): Update prototype.
+	(set_nothrow_function_flags): Update cgraph.
+	* tree-cfg.c (verify_stmt): Relax nothrow checking when in IPA mode.
+

To reproduce on a simple test case:

BUILD=/some/where
SRC=/some/whereelse

$BUILD/gcc/gnatmake -f -g -m32 --GCC=$BUILD/gcc/xgcc --GNATLINK=$BUILD/gcc/gnatlink --GNATBIND=$BUILD/gcc/gnatbind --RTS=$BUILD/x86_64-unknown-linux-gnu/32/libada/ $SRC/gcc/testsuite/gnat.dg/not_null.adb -cargs -B$BUILD/gcc  -largs -B$BUILD/gcc
./not_null

This will raise an exception which means the main program exception handler does not receive the exception.

This was likely fixed by:

2009-04-19  Jan Hubicka  <jh@suse.cz>

	* cgraph.c (cgraph_create_edge, cgraph_set_call_stmt): Set proper cfun.
	(dump_cgraph_node): Dump can throw external flag.
	* ipa-pure-const.c (propagate): Fix propagation of nothrow flags.

I will confirm later on.
Comment 9 Laurent GUERBY 2009-04-20 08:33:32 UTC
Confirmed, Jan Hubicka second patch fixed the issue:

146344: FAIL
146349: OK

My apologies to Richard :)