diff mbox

Patch RFA: With -fnon-call-exceptions sync builtins may throw

Message ID CAKOQZ8wtLP1HgB4nf99z64=CLKvAdqTYkTwZVYahqsUrNgGGaQ@mail.gmail.com
State New
Headers show

Commit Message

Ian Lance Taylor Nov. 4, 2013, 10:09 p.m. UTC
On Mon, Nov 4, 2013 at 1:24 PM, Marc Glisse <marc.glisse@inria.fr> wrote:
> On Mon, 4 Nov 2013, Ian Lance Taylor wrote:
>
>> 2013-11-04  Ian Lance Taylor  <iant@google.com>
>>
>>         * builtins.def (ATTR_NOTHROWCALL_LEAF_LIST): Define.
>>         * sync-builtins.def: Use ATTR_NOTHROWCALL_LEAF_LIST for all sync
>>         builtins that take pointers.
>>         * lto-opts.c (lto_write_options): Write -fnon-call-exceptions
>>         if set.
>>         * lto-wrapper.c (merge_and_complain): Collect
>>         OPT_fnon_call_exceptions.
>>         (run_gcc): Pass -fnon-call-exceptions.
>
>
> Hello,
>
> I am seeing a bootstrap failure that seems related:
>
> /data/repos/gcc/pristine/gcc/builtins.def:220:2: error: 'ATTR_LEAF_LIST' was
> not declared in this scope
>   ATTR_LEAF_LIST : ATTR_NOTHROW_LEAF_LIST)
>   ^
> /data/repos/gcc/pristine/gcc/fortran/f95-lang.c:1034:4: note: in definition
> of macro 'DEF_SYNC_BUILTIN'
>     attr);
>     ^
> /data/repos/gcc/pristine/gcc/fortran/../sync-builtins.def:32:21: note: in
> expansion of macro 'ATTR_NOTHROWCALL_LEAF_LIST'
>      BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
>                      ^
> make[3]: *** [fortran/f95-lang.o] Error 1


My apologies for the breakage.  I tested Ada, but I somehow failed to
test Fortran.

Fixed with this patch.  Bootstrapped and ran Fortran testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian


2013-11-04  Ian Lance Taylor  <iant@google.com>

	* f95-lang.c (ATTR_LEAF_LIST): Define.
diff mbox

Patch

Index: fortran/f95-lang.c
===================================================================
--- fortran/f95-lang.c	(revision 204367)
+++ fortran/f95-lang.c	(working copy)
@@ -531,8 +531,9 @@ 
   return decl;
 }
 
-/* So far we need just these 6 attribute types.  */
+/* So far we need just these 7 attribute types.  */
 #define ATTR_NULL			0
+#define ATTR_LEAF_LIST			(ECF_LEAF)
 #define ATTR_NOTHROW_LEAF_LIST		(ECF_NOTHROW | ECF_LEAF)
 #define ATTR_NOTHROW_LEAF_MALLOC_LIST	(ECF_NOTHROW | ECF_LEAF | ECF_MALLOC)
 #define ATTR_CONST_NOTHROW_LEAF_LIST	(ECF_NOTHROW | ECF_LEAF | ECF_CONST)