From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31850 invoked by alias); 9 Jan 2015 22:35:53 -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 31790 invoked by uid 48); 9 Jan 2015 22:35:48 -0000 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/64551] Segfault in target_opts_for_fn (from ipa_icf::sem_function::equals_private) Date: Fri, 09 Jan 2015 22:35: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: marxin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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: 2015-01/txt/msg00674.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64551 Martin Li=C5=A1ka changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #4 from Martin Li=C5=A1ka --- Hello. Sorry for such issue during Friday evening. The problem is that for target compiler, target_option_default_node =3D=3D NULL. I am not so familiar with= options if this is correct situation? Anyway, following suggested patch return NULL as cl_target_option that comp= ared correctly: diff --git a/gcc/tree.h b/gcc/tree.h index e9af9bf..d3f13e8 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4678,6 +4678,10 @@ target_opts_for_fn (const_tree fndecl) tree fn_opts =3D DECL_FUNCTION_SPECIFIC_TARGET (fndecl); if (fn_opts =3D=3D NULL_TREE) fn_opts =3D target_option_default_node; + + if (fn_opts =3D=3D NULL_TREE) + return NULL; + return TREE_TARGET_OPTION (fn_opts); } Martin >>From gcc-bugs-return-472681-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jan 09 23:22:12 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 24214 invoked by alias); 9 Jan 2015 23:22:11 -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 24116 invoked by uid 48); 9 Jan 2015 23:22:05 -0000 From: "egall at gwmail dot gwu.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/60670] omp.h may differ between multilibs Date: Fri, 09 Jan 2015 23:22:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgomp X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: egall at gwmail dot gwu.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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: 2015-01/txt/msg00675.txt.bz2 Content-length: 993 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670 Eric Gallager changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |egall at gwmail dot gwu.edu --- Comment #9 from Eric Gallager --- (In reply to ro@CeBiTec.Uni-Bielefeld.DE from comment #2) > > --- Comment #1 from Richard Biener --- > > Or the header needs to include all variants with proper #ifdef-ery > > This is difficult for a header generated per multilib at build time. > GNU diff can can merge two C/C++ header files with the proper ifdef-ery: see: http://www.gnu.org/software/diffutils/manual/html_mono/diff.html#If-then-else and also: http://www.gnu.org/software/diffutils/manual/html_mono/diff.html#Detailed%20If-then-else This could be done as part of the generation of the header at build time.