From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20292 invoked by alias); 23 Oct 2014 21:08:50 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 19920 invoked by uid 55); 23 Oct 2014 21:08:44 -0000 From: "mliska at suse dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/63587] [5 Regression] ICE : tree check: expected var_decl, have result_decl in add_local_variables, at tree-inline.c:4112 Date: Thu, 23 Oct 2014 21:09:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mliska at suse dot cz X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg01896.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63587 --- Comment #9 from Martin Li=C5=A1ka --- On 10/20/2014 09:48 AM, rguenther at suse dot de wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63587 > > --- Comment #4 from rguenther at suse dot de -= -- > On Sun, 19 Oct 2014, mliska at suse dot cz wrote: > >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63587 >> >> --- Comment #2 from Martin Li=C5=A1ka --- >> Following two functions are merged: >> static boost::log::make_output_actor, RightT, ValueT>:= :type >> boost::log::make_output_actor, RightT, >> ValueT>::make(ActorT, RightT&) [with ActorT =3D boost::actor; >> LeftExprT =3D int; RightT =3D boost::log::attribute_actor> boost::log::value_extractor, void, boost::actor>; ValueT =3D int; >> boost::log::make_output_actor, RightT, ValueT>::type = =3D >> boost::actor, >> boost::log::to_log_fun> >] (struct actor left, struct attribute_actor & = right) >> >> >> static boost::log::make_output_actor, RightT, ValueT>:= :type >> boost::log::make_output_actor, RightT, >> ValueT>::make(ActorT, RightT&) [with ActorT =3D boost::actor; >> LeftExprT =3D int; RightT =3D boost::log::attribute_actor<{anonymous}::m= y_class, >> boost::log::value_extractor, void, boost::actor>; ValueT =3D int; >> boost::log::make_output_actor, RightT, ValueT>::type = =3D >> boost::actor, >> boost::log::to_log_fun> >] (struct actor left, struct attribute_actor & = right) >> >> with following body: >> { >> struct type D.3826; >> struct to_log_fun D.3825; >> struct attribute_name D.3824; >> int SR.9; >> struct actor left; >> >> : >> left =3D left; >> SR.9_4 =3D MEM[(struct attribute_terminal *)right_2(D)]; >> MEM[(struct attribute_name *)&D.3824] =3D SR.9_4; >> boost::log::attribute_output_terminal, >> boost::log::to_log_fun>::attribute_output_terminal (&D.3826, left, = D.3824, >> D.3825, 0); >> D.3826 =3D{v} {CLOBBER}; >> return; >> >> } >> >> >> >> As I was debugging ao_ref_alias_sets, there's MEM_REF where we have diff= erent >> template arguments: attribute_actor vs. >> attribute_actor<{anonymous}::my_class,...>. >> What do you think Richard about these record_types from alias set perspe= ctive: >> >> (gdb) p debug_tree(t1) >> > type > size >> unit size >> align 32 symtab 0 alias set 4 canonical type 0x7ffff6c33690 pre= cision >> 32 min max > 2147483647> >> pointer_to_this > >> >> arg 0 > type > attribute_actor> >> unsigned DI >> size >> unit size >> align 64 symtab 0 alias set 7 canonical type 0x7ffff6e20d20> >> visited var def_stmt GIMPLE_NOP >> >> version 2 >> ptr-info 0x7ffff6a7e3d8> >> arg 1 >> constant 0>> >> $1 =3D void >> (gdb) p debug_tree(t2) >> > type > size >> unit size >> align 32 symtab 0 alias set 4 canonical type 0x7ffff6c33690 pre= cision >> 32 min max > 2147483647> >> pointer_to_this > >> >> arg 0 > type > attribute_actor> >> unsigned DI >> size >> unit size >> align 64 symtab 0 alias set 7 canonical type 0x7ffff6e20540> >> visited var def_stmt GIMPLE_NOP >> >> version 2 >> ptr-info 0x7ffff6a7e300> >> arg 1 >> constant 0>> >> >> these types are called for alias_set comparison, with following record_t= ypes: >> (gdb) p debug_tree((tree_node*)0x7ffff6de7dc8) >> > SI >> size > bitsizetype> constant 32> >> unit size > sizetype> constant 4> >> align 32 symtab 0 alias set 17 canonical type 0x7ffff6de7dc8 >> fields > type > SI size unit size > 4> >> align 32 symtab 0 alias set 15 canonical type 0x7ffff6dddb2= 8 fields >> context > boost> >> full-name "struct boost::actor" >> needs-constructor X() X(constX&) this=3D(X&) n_parents=3D0 >> use_template=3D1 interface-unknown >> pointer_to_this reference_to_= this >> chain > >> ignored decl_6 SI file ../../PR33754.c line 167 col 7 size > 0x7ffff6c51048 32> unit size >> align 32 offset_align 128 >> offset >> bit offset context > 0x7ffff6de7dc8 attribute_actor> >> chain > 0x7ffff6de80a8 attribute_actor> >> external nonlocal suppress-debug decl_4 VOID file ../../PR3= 3754.c >> line 168 col 1 >> align 8 context result >> >> chain >> context >> >> full-name "class boost::log::attribute_actor> boost::log::value_extractor, void, boost::actor>" >> needs-constructor X() X(constX&) this=3D(X&) n_parents=3D1 use_temp= late=3D1 >> interface-unknown >> pointer_to_this reference_to_this >> chain > attribute_actor>> >> $3 =3D void >> (gdb) p debug_tree((tree_node*)0x7ffff6ddd888) >> > SI >> size > bitsizetype> constant 32> >> unit size > sizetype> constant 4> >> align 32 symtab 0 alias set 14 canonical type 0x7ffff6ddd888 >> fields > type > SI size unit size > 4> >> align 32 symtab 0 alias set 15 canonical type 0x7ffff6dddb2= 8 fields >> context > boost> >> full-name "struct boost::actor" >> needs-constructor X() X(constX&) this=3D(X&) n_parents=3D0 >> use_template=3D1 interface-unknown >> pointer_to_this reference_to_= this >> chain > >> ignored decl_6 SI file ../../PR33754.c line 167 col 7 size > 0x7ffff6c51048 32> unit size >> align 32 offset_align 128 >> offset >> bit offset context > 0x7ffff6ddd888 attribute_actor> >> chain > 0x7ffff6de12a0 attribute_actor> >> external nonlocal suppress-debug decl_4 VOID file ../../PR3= 3754.c >> line 168 col 1 >> align 8 context result >> >> chain >> context >> >> full-name "class boost::log::attribute_actor<{anonymous}::my_class, >> boost::log::value_extractor, void, boost::actor>" >> needs-constructor X() X(constX&) this=3D(X&) n_parents=3D1 use_temp= late=3D1 >> interface-unknown >> pointer_to_this reference_to_this >> chain > attribute_actor>> >> >> If the alias sets can be considered to be equal, we must face some laten= t bug >> in inliner? > Maybe. Btw, I see some issues in func_checker::compare_operand with > regard to it doing redundant checks: > > if (!func_checker::compatible_types_p (TREE_TYPE (x1), TREE_TYPE > (x2))) > return return_false (); > > Redundant with the following > > if (!compare_operand (x1, x2)) > return return_false_with_msg (""); > > ... > > if (get_alias_set (TREE_TYPE (y1)) !=3D get_alias_set (TREE_TYPE > (y2))) > return return_false_with_msg ("alias set for MEM_REF offsets a= re > different"); > > Redundant with the following > > ao_ref r1, r2; > ao_ref_init (&r1, t1); > ao_ref_init (&r2, t2); > if (ao_ref_alias_set (&r1) !=3D ao_ref_alias_set (&r2) > || ao_ref_base_alias_set (&r1) !=3D ao_ref_base_alias_set (&= r2)) > return return_false_with_msg ("ao alias sets are different"); > > > /* Type of the offset on MEM_REF does not matter. */ > return wi::to_offset (y1) =3D=3D wi::to_offset (y2); > > Use tree_int_cst_equal (y1, y2). > > case COMPONENT_REF: > { > x1 =3D TREE_OPERAND (t1, 0); > x2 =3D TREE_OPERAND (t2, 0); > y1 =3D TREE_OPERAND (t1, 1); > y2 =3D TREE_OPERAND (t2, 1); > > ret =3D compare_operand (x1, x2) > && compare_operand (y1, y2); > > comparing FIELD_DECLs like you do looks dangerous to me (and it looks > redundant with the get_addr_base_and_unit_offset you do - which btw > also defeats the ao_ref alias checks as you effectively drop the > get_alias_set () compare). > > IMHO folding memory access comparison and general operand comparison > into one function makes it very much less clear what is going on... > > So - can you please split this into the general compare_operand > and a compare_memory_access function? Hello. I come up with first version of transformation (ipa-icf-gimple.c=20 attachment). I would like to ask which TREE_CODE reside in the newly create function.=20 MEM_REF must be there to introduce a single place where alias_set comparison will be called.=20 I'm wondering about get_addr_base_and_unit_offset, for which group of=20 operations should I call it? If you remember a patch where I added support for volatility check,=20 should it be really placed to compare_memory_access, or would be efficient handling in=20 gimple_call/assign check function? Thank you, Martin > >>From gcc-bugs-return-464876-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Oct 23 21:09:10 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 20980 invoked by alias); 23 Oct 2014 21:09:09 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 20947 invoked by uid 48); 23 Oct 2014 21:09:05 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/63619] warning:=?UTF-8?Q?=20deleting=20=E2=80=98void=2A=E2=80=99=20is=20undefined=20has=20no=20=2DW=20flag?= Date: Thu, 23 Oct 2014 21:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution target_milestone Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg01897.txt.bz2 Content-length: 486 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63619 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Target Milestone|--- |5.0 --- Comment #6 from Jonathan Wakely --- Fixed on trunk.