From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F04CE385515F; Sat, 3 Dec 2022 10:08:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F04CE385515F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670062117; bh=1pD6n92Fi/hYjQLn1hM23Gq+9hvLBrrdTZrHyP2KSHg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lROdRuD7xBdc8hdHEvzmTgkE5F6NG+74AsESlIwhdW6X/bDCBys6FtsmLAz+4vamn OMGeRuRYZqe1EwhNFnjVEGFf7ksjSlHXUmAkS+GTjKpMEFoe00PSjjD8pteGC5sEYH aZHTp7sep7j19xnVT030DtK85xnw/8xVErnOZ1Eo= From: "sam at gentoo dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/107078] LTO is causing that firebird build is core dumping Date: Sat, 03 Dec 2022 10:08:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 12.2.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: sam at gentoo dot org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107078 Sam James changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sam at gentoo dot org --- Comment #19 from Sam James --- I get some ODR warnings in gpre: ``` /tmp/firebird/Firebird-4.0.2.2816-0/src/gpre/pat.cpp:60:21: warning: type =E2=80=98struct ops=E2=80=99 violates the C++ One Definition Rule [-Wodr] 60 | static const struct ops | ^ /tmp/firebird/Firebird-4.0.2.2816-0/src/gpre/sqe.cpp:124:8: note: a differe= nt type is defined in another translation unit 124 | struct ops | ^ /tmp/firebird/Firebird-4.0.2.2816-0/src/gpre/pat.cpp:62:15: note: the first difference of corresponding definitions is field =E2=80=98ops_type=E2=80=99 62 | pat_t ops_type; | ^ /tmp/firebird/Firebird-4.0.2.2816-0/src/gpre/sqe.cpp:126:15: note: a field = with different name is defined in another translation unit 126 | nod_t rel_op; | ^ lto-wrapper: warning: using serial compilation of 11 LTRANS jobs lto-wrapper: note: see the =E2=80=98-flto=E2=80=99 option documentation for= more information rm -f /tmp/firebird/Firebird-4.0.2.2816-0/gen/Release/firebird/bin/gpre_cur= rent ``` -- Anyway, as a hack, try this: ``` diff --git a/gen/Makefile b/gen/Makefile index a121c31..8eabd44 100644 --- a/gen/Makefile +++ b/gen/Makefile @@ -438,7 +438,7 @@ yachts.lnk: metadata.fdb metadata.fdb: $(RUN_ISQL) $(SRC_ROOT)/dbs/metadata.sql -$(RM) $@ - $(RUN_ISQL) -q -i $(SRC_ROOT)/dbs/metadata.sql + gdbserver 127.0.0.1:1234 -- $(RUN_ISQL) -q -i $(SRC_ROOT)/dbs/metadata.sql $(RUN_GFIX) -mode read_only $@ $(CHMOD) 0444 $@ @@ -467,9 +467,9 @@ security.fdb: $(SRC_ROOT)/dbs/security.sql msg.timestamp: $(MSG_FILES) -$(RM) msg.fdb - echo create database \'msg.fdb\'\; | $(RUN_ISQL) + echo create database \'msg.fdb\'\; | gdbserver 127.0.0.1:1235 -- $(RUN_ISQL) $(RUN_GFIX) -write async msg.fdb - for sql in $(MSG_FILES); do (echo $$sql; $(RUN_ISQL) -i $$sql msg.f= db) || exit; done + for sql in $(MSG_FILES); do (echo $$sql; gdbserver 127.0.0.1:1236 -- $(RUN_ISQL) -i $$sql msg.fdb) || exit; done $(TOUCH) $@ ```=