public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH lto]Fix the mis-matched arguments of lto_define_builtins
@ 2014-08-07  9:46 Bin Cheng
  2014-08-07 12:06 ` Richard Biener
  0 siblings, 1 reply; 6+ messages in thread
From: Bin Cheng @ 2014-08-07  9:46 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 351 bytes --]

Hi,
As analyzed in PR62032, this patch fixes the latent lto bug by switching
arguments of lto_define_builtins, otherwise vsnprintf-chk.c would fail on
arm/aarch64 with lto options.

Is it ok if bootstrap and test pass?


2014-08-07  Bin Cheng  <bin.cheng@arm.com>

	PR lto/62032
	* lto/lto-lang.c (lto_init): Switch mis-matched arguments.

[-- Attachment #2: lto-va_list-builtins-20140807.txt --]
[-- Type: text/plain, Size: 512 bytes --]

Index: gcc/lto/lto-lang.c
===================================================================
--- gcc/lto/lto-lang.c	(revision 213698)
+++ gcc/lto/lto-lang.c	(working copy)
@@ -1192,10 +1192,10 @@ lto_init (void)
     }
   else
     {
-      lto_define_builtins (va_list_type_node,
-			   build_reference_type (va_list_type_node));
+      lto_define_builtins (build_reference_type (va_list_type_node),
+			   va_list_type_node);
     }
-  
+
   if (flag_cilkplus)
     cilk_init_builtins ();
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH lto]Fix the mis-matched arguments of lto_define_builtins
  2014-08-07  9:46 [PATCH lto]Fix the mis-matched arguments of lto_define_builtins Bin Cheng
@ 2014-08-07 12:06 ` Richard Biener
  2014-08-08  8:05   ` Bin.Cheng
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Biener @ 2014-08-07 12:06 UTC (permalink / raw)
  To: Bin Cheng; +Cc: GCC Patches

On Thu, Aug 7, 2014 at 11:46 AM, Bin Cheng <bin.cheng@arm.com> wrote:
> Hi,
> As analyzed in PR62032, this patch fixes the latent lto bug by switching
> arguments of lto_define_builtins, otherwise vsnprintf-chk.c would fail on
> arm/aarch64 with lto options.
>
> Is it ok if bootstrap and test pass?

Ok (would be nice if you can check if LTO bootstrap still works).

Thanks,
Richard.

>
> 2014-08-07  Bin Cheng  <bin.cheng@arm.com>
>
>         PR lto/62032
>         * lto/lto-lang.c (lto_init): Switch mis-matched arguments.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH lto]Fix the mis-matched arguments of lto_define_builtins
  2014-08-07 12:06 ` Richard Biener
@ 2014-08-08  8:05   ` Bin.Cheng
  2014-08-08  8:54     ` Richard Biener
  0 siblings, 1 reply; 6+ messages in thread
From: Bin.Cheng @ 2014-08-08  8:05 UTC (permalink / raw)
  To: Richard Biener; +Cc: Bin Cheng, GCC Patches

On Thu, Aug 7, 2014 at 8:06 PM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Thu, Aug 7, 2014 at 11:46 AM, Bin Cheng <bin.cheng@arm.com> wrote:
>> Hi,
>> As analyzed in PR62032, this patch fixes the latent lto bug by switching
>> arguments of lto_define_builtins, otherwise vsnprintf-chk.c would fail on
>> arm/aarch64 with lto options.
>>
>> Is it ok if bootstrap and test pass?
>
> Ok (would be nice if you can check if LTO bootstrap still works).
Done.  Bootstrap with "--with-build-config=bootstrap-lto" works fine.
I will commit this to trunk and wait for couple of days before
back-port to 4_9 branch.  Is that OK?

BTW, I found GCC trunk@213701 failed when building ada with below ICE
message, so I have to do the bootstrap with ada disabled.

../../gcc/gcc/ada/exp_ch3.adb: In function 'exp_ch3__get_simple_init_val':
../../gcc/gcc/ada/exp_ch3.adb:7695:4: internal compiler error: in
forward_edge_to_pdom, at tree-ssa-dce.c:1042
    function Get_Simple_Init_Val
    ^
0xc23a8d forward_edge_to_pdom
../../gcc/gcc/tree-ssa-dce.c:1042
0xc23c21 remove_dead_stmt
../../gcc/gcc/tree-ssa-dce.c:1091
0xc24120 eliminate_unnecessary_stmts
../../gcc/gcc/tree-ssa-dce.c:1218
0xc24b23 perform_tree_ssa_dce
../../gcc/gcc/tree-ssa-dce.c:1460
0xc24c1c tree_ssa_cd_dce
../../gcc/gcc/tree-ssa-dce.c:1501
0xc24d86 execute
../../gcc/gcc/tree-ssa-dce.c:1566
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [/tmp/cc4oj0WO.ltrans1.ltrans.o] Error 1
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[3]: *** [gnat1] Error 1
make[3]: *** Waiting for unfinished jobs....

Thanks,
bin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH lto]Fix the mis-matched arguments of lto_define_builtins
  2014-08-08  8:05   ` Bin.Cheng
@ 2014-08-08  8:54     ` Richard Biener
  2014-08-08  9:00       ` Bin.Cheng
  2014-08-15  5:53       ` Bin.Cheng
  0 siblings, 2 replies; 6+ messages in thread
From: Richard Biener @ 2014-08-08  8:54 UTC (permalink / raw)
  To: Bin.Cheng; +Cc: Bin Cheng, GCC Patches

On Fri, Aug 8, 2014 at 10:05 AM, Bin.Cheng <amker.cheng@gmail.com> wrote:
> On Thu, Aug 7, 2014 at 8:06 PM, Richard Biener
> <richard.guenther@gmail.com> wrote:
>> On Thu, Aug 7, 2014 at 11:46 AM, Bin Cheng <bin.cheng@arm.com> wrote:
>>> Hi,
>>> As analyzed in PR62032, this patch fixes the latent lto bug by switching
>>> arguments of lto_define_builtins, otherwise vsnprintf-chk.c would fail on
>>> arm/aarch64 with lto options.
>>>
>>> Is it ok if bootstrap and test pass?
>>
>> Ok (would be nice if you can check if LTO bootstrap still works).
> Done.  Bootstrap with "--with-build-config=bootstrap-lto" works fine.
> I will commit this to trunk and wait for couple of days before
> back-port to 4_9 branch.  Is that OK?

Sure.

> BTW, I found GCC trunk@213701 failed when building ada with below ICE
> message, so I have to do the bootstrap with ada disabled.

Heh - I usually do LTO bootstrap only for c,c++,fortran as otherwise it
takes ages... ;)

Richard.

> ../../gcc/gcc/ada/exp_ch3.adb: In function 'exp_ch3__get_simple_init_val':
> ../../gcc/gcc/ada/exp_ch3.adb:7695:4: internal compiler error: in
> forward_edge_to_pdom, at tree-ssa-dce.c:1042
>     function Get_Simple_Init_Val
>     ^
> 0xc23a8d forward_edge_to_pdom
> ../../gcc/gcc/tree-ssa-dce.c:1042
> 0xc23c21 remove_dead_stmt
> ../../gcc/gcc/tree-ssa-dce.c:1091
> 0xc24120 eliminate_unnecessary_stmts
> ../../gcc/gcc/tree-ssa-dce.c:1218
> 0xc24b23 perform_tree_ssa_dce
> ../../gcc/gcc/tree-ssa-dce.c:1460
> 0xc24c1c tree_ssa_cd_dce
> ../../gcc/gcc/tree-ssa-dce.c:1501
> 0xc24d86 execute
> ../../gcc/gcc/tree-ssa-dce.c:1566
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See <http://gcc.gnu.org/bugs.html> for instructions.
> make[4]: *** [/tmp/cc4oj0WO.ltrans1.ltrans.o] Error 1
> lto-wrapper: fatal error: make returned 2 exit status
> compilation terminated.
> /usr/bin/ld: lto-wrapper failed
> collect2: error: ld returned 1 exit status
> make[3]: *** [gnat1] Error 1
> make[3]: *** Waiting for unfinished jobs....
>
> Thanks,
> bin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH lto]Fix the mis-matched arguments of lto_define_builtins
  2014-08-08  8:54     ` Richard Biener
@ 2014-08-08  9:00       ` Bin.Cheng
  2014-08-15  5:53       ` Bin.Cheng
  1 sibling, 0 replies; 6+ messages in thread
From: Bin.Cheng @ 2014-08-08  9:00 UTC (permalink / raw)
  To: Richard Biener; +Cc: Bin Cheng, GCC Patches

On Fri, Aug 8, 2014 at 4:54 PM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Fri, Aug 8, 2014 at 10:05 AM, Bin.Cheng <amker.cheng@gmail.com> wrote:
>> On Thu, Aug 7, 2014 at 8:06 PM, Richard Biener
>> <richard.guenther@gmail.com> wrote:
>>> On Thu, Aug 7, 2014 at 11:46 AM, Bin Cheng <bin.cheng@arm.com> wrote:
>>>> Hi,
>>>> As analyzed in PR62032, this patch fixes the latent lto bug by switching
>>>> arguments of lto_define_builtins, otherwise vsnprintf-chk.c would fail on
>>>> arm/aarch64 with lto options.
>>>>
>>>> Is it ok if bootstrap and test pass?
>>>
>>> Ok (would be nice if you can check if LTO bootstrap still works).
>> Done.  Bootstrap with "--with-build-config=bootstrap-lto" works fine.
>> I will commit this to trunk and wait for couple of days before
>> back-port to 4_9 branch.  Is that OK?
>
> Sure.
>
>> BTW, I found GCC trunk@213701 failed when building ada with below ICE
>> message, so I have to do the bootstrap with ada disabled.
>
> Heh - I usually do LTO bootstrap only for c,c++,fortran as otherwise it
> takes ages... ;)

Yes,it is slow, good news is lto works for java,objc,objc++,go on my machine.

Thanks,
bin
>
> Richard.
>
>> ../../gcc/gcc/ada/exp_ch3.adb: In function 'exp_ch3__get_simple_init_val':
>> ../../gcc/gcc/ada/exp_ch3.adb:7695:4: internal compiler error: in
>> forward_edge_to_pdom, at tree-ssa-dce.c:1042
>>     function Get_Simple_Init_Val
>>     ^
>> 0xc23a8d forward_edge_to_pdom
>> ../../gcc/gcc/tree-ssa-dce.c:1042
>> 0xc23c21 remove_dead_stmt
>> ../../gcc/gcc/tree-ssa-dce.c:1091
>> 0xc24120 eliminate_unnecessary_stmts
>> ../../gcc/gcc/tree-ssa-dce.c:1218
>> 0xc24b23 perform_tree_ssa_dce
>> ../../gcc/gcc/tree-ssa-dce.c:1460
>> 0xc24c1c tree_ssa_cd_dce
>> ../../gcc/gcc/tree-ssa-dce.c:1501
>> 0xc24d86 execute
>> ../../gcc/gcc/tree-ssa-dce.c:1566
>> Please submit a full bug report,
>> with preprocessed source if appropriate.
>> Please include the complete backtrace with any bug report.
>> See <http://gcc.gnu.org/bugs.html> for instructions.
>> make[4]: *** [/tmp/cc4oj0WO.ltrans1.ltrans.o] Error 1
>> lto-wrapper: fatal error: make returned 2 exit status
>> compilation terminated.
>> /usr/bin/ld: lto-wrapper failed
>> collect2: error: ld returned 1 exit status
>> make[3]: *** [gnat1] Error 1
>> make[3]: *** Waiting for unfinished jobs....
>>
>> Thanks,
>> bin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH lto]Fix the mis-matched arguments of lto_define_builtins
  2014-08-08  8:54     ` Richard Biener
  2014-08-08  9:00       ` Bin.Cheng
@ 2014-08-15  5:53       ` Bin.Cheng
  1 sibling, 0 replies; 6+ messages in thread
From: Bin.Cheng @ 2014-08-15  5:53 UTC (permalink / raw)
  To: Richard Biener; +Cc: Bin Cheng, GCC Patches

On Fri, Aug 8, 2014 at 4:54 PM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Fri, Aug 8, 2014 at 10:05 AM, Bin.Cheng <amker.cheng@gmail.com> wrote:
>> On Thu, Aug 7, 2014 at 8:06 PM, Richard Biener
>> <richard.guenther@gmail.com> wrote:
>>> On Thu, Aug 7, 2014 at 11:46 AM, Bin Cheng <bin.cheng@arm.com> wrote:
>>>> Hi,
>>>> As analyzed in PR62032, this patch fixes the latent lto bug by switching
>>>> arguments of lto_define_builtins, otherwise vsnprintf-chk.c would fail on
>>>> arm/aarch64 with lto options.
>>>>
>>>> Is it ok if bootstrap and test pass?
>>>
>>> Ok (would be nice if you can check if LTO bootstrap still works).
>> Done.  Bootstrap with "--with-build-config=bootstrap-lto" works fine.
>> I will commit this to trunk and wait for couple of days before
>> back-port to 4_9 branch.  Is that OK?
>
> Sure.
Since the patch is on trunk for one week with no issue reported, I
backported it to gcc-4_9 branch as revision 214000.

Thanks,
bin
>
>> BTW, I found GCC trunk@213701 failed when building ada with below ICE
>> message, so I have to do the bootstrap with ada disabled.
>
> Heh - I usually do LTO bootstrap only for c,c++,fortran as otherwise it
> takes ages... ;)
>
> Richard.
>
>> ../../gcc/gcc/ada/exp_ch3.adb: In function 'exp_ch3__get_simple_init_val':
>> ../../gcc/gcc/ada/exp_ch3.adb:7695:4: internal compiler error: in
>> forward_edge_to_pdom, at tree-ssa-dce.c:1042
>>     function Get_Simple_Init_Val
>>     ^
>> 0xc23a8d forward_edge_to_pdom
>> ../../gcc/gcc/tree-ssa-dce.c:1042
>> 0xc23c21 remove_dead_stmt
>> ../../gcc/gcc/tree-ssa-dce.c:1091
>> 0xc24120 eliminate_unnecessary_stmts
>> ../../gcc/gcc/tree-ssa-dce.c:1218
>> 0xc24b23 perform_tree_ssa_dce
>> ../../gcc/gcc/tree-ssa-dce.c:1460
>> 0xc24c1c tree_ssa_cd_dce
>> ../../gcc/gcc/tree-ssa-dce.c:1501
>> 0xc24d86 execute
>> ../../gcc/gcc/tree-ssa-dce.c:1566
>> Please submit a full bug report,
>> with preprocessed source if appropriate.
>> Please include the complete backtrace with any bug report.
>> See <http://gcc.gnu.org/bugs.html> for instructions.
>> make[4]: *** [/tmp/cc4oj0WO.ltrans1.ltrans.o] Error 1
>> lto-wrapper: fatal error: make returned 2 exit status
>> compilation terminated.
>> /usr/bin/ld: lto-wrapper failed
>> collect2: error: ld returned 1 exit status
>> make[3]: *** [gnat1] Error 1
>> make[3]: *** Waiting for unfinished jobs....
>>
>> Thanks,
>> bin

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-08-15  5:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-07  9:46 [PATCH lto]Fix the mis-matched arguments of lto_define_builtins Bin Cheng
2014-08-07 12:06 ` Richard Biener
2014-08-08  8:05   ` Bin.Cheng
2014-08-08  8:54     ` Richard Biener
2014-08-08  9:00       ` Bin.Cheng
2014-08-15  5:53       ` Bin.Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).