------- Comment #8 from laurent at guerby dot net  2009-04-20 00:07 -------
I made a procedural mistake above, the right FAIL point is:

146321: OK
146322: FAIL

diff:

+2009-04-18  Jan Hubicka  <j...@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  <j...@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.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39812

Reply via email to