Re: [Patch][LTO] Set proper DECL_ALIGN in offload_handle_link_vars (PR94233)

2020-03-23 Thread Richard Biener
On Sat, 21 Mar 2020, Tobias Burnus wrote: > On 3/21/20 8:03 AM, Richard Biener wrote: > > >> OK for the trunk? > > It should be TYPE_ALIGN (type). OK with that change. > > I am confused. The patch has: > + SET_DECL_ALIGN (link_ptr_var, TYPE_ALIGN (ptr_type_node)); > which looks correct and

Re: [Patch][LTO] Set proper DECL_ALIGN in offload_handle_link_vars (PR94233)

2020-03-21 Thread Tobias Burnus
On 3/21/20 8:03 AM, Richard Biener wrote: OK for the trunk? It should be TYPE_ALIGN (type). OK with that change. I am confused. The patch has: + SET_DECL_ALIGN (link_ptr_var, TYPE_ALIGN (ptr_type_node)); which looks correct and to uses already TYPE_ALIGN?!? Note this fails to honor ta

Re: [Patch][LTO] Set proper DECL_ALIGN in offload_handle_link_vars (PR94233)

2020-03-21 Thread Richard Biener
On March 20, 2020 10:10:54 PM GMT+01:00, Tobias Burnus wrote: >When compiling the existing libgomp.c/target-link-1.c with -O3, the >test case was ICEing as DECL_ALIGN was 1 (alias "1U << 0"). > >The reason is that "make_node (VAR_DECL)" calls "SET_DECL_ALIGN (t, 1)" >and unless one overrides this

[Patch][LTO] Set proper DECL_ALIGN in offload_handle_link_vars (PR94233)

2020-03-20 Thread Tobias Burnus
When compiling the existing libgomp.c/target-link-1.c with -O3, the test case was ICEing as DECL_ALIGN was 1 (alias "1U << 0"). The reason is that "make_node (VAR_DECL)" calls "SET_DECL_ALIGN (t, 1)" and unless one overrides this, it stays like that. Here, it later failed by violating the assert