From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BFFCC3858C5E; Mon, 2 Oct 2023 12:03:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BFFCC3858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696248225; bh=SGWBkKbTTGxcxhrkg7D/Jfq/w2VA2v7W4LOj8dEYFHA=; h=From:To:Subject:Date:From; b=TBH2CzXGIk2oWqo73G4N3biBbPBk2SZqBYUawNAd5QXruCxyc/GJaLzipq3wLXcM9 gh90kSG6NxncEdug25hArgeFrUhaM+Vzkg3wQJyDbJ4jglAQZ2f1C0S0HoMwApvAFN K4/wh4o70P+eCC1W6hOksvdmTQKSbuJ0k9VAJaFI= From: "slyfox at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBib290c3RyYXAvMTExNjYzXSBOZXc6IHByb2ZpbGVkYm9v?= =?UTF-8?B?dHN0cmFwIGZhaWxzIG9uIG1hc3RlcjogZ2NjL2dlbm1vZGVzLmNjOjIxNTI6?= =?UTF-8?B?MTogZXJyb3I6IOKAmGdjYy9idWlsZC9nZW5tb2Rlcy5nY2Rh4oCZIHByb2Zp?= =?UTF-8?B?bGUgY291bnQgZGF0YSBmaWxlIG5vdCBmb3VuZCBbLVdlcnJvcj1taXNzaW5n?= =?UTF-8?B?LXByb2ZpbGVd?= Date: Mon, 02 Oct 2023 12:03:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D111663 Bug ID: 111663 Summary: profiledbootstrap fails on master: gcc/genmodes.cc:2152:1: error: =E2=80=98gcc/build/genmodes.gcda=E2=80=99 profile count= data file not found [-Werror=3Dmissing-profile] Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- It is the same issue diagnosed by Martin in https://gcc.gnu.org/PR87932#c2 The only difference here is the failure of profiledbootstrap on master by default (until you disable -Werror). The reproducer: $ ~/dev/git/gcc/configure --disable-multilib --enable-languages=3Dc,c++ CC=3D'gcc -O2' CXX=3D'g++ -O2' $ make profiledbootstrap ... gcc/gcc/sort.cc: In function =E2=80=98void reorder45(sort_ctx*, char*, char= *, char*, char*, char*) [with sort_ctx =3D sort_r_ctx]=E2=80=99: gcc/gcc/sort.cc:313:1: error: =E2=80=98gcc/build/sort.gcda=E2=80=99 profile= count data file not found [-Werror=3Dmissing-profile] 313 | } | ^ gcc/gcc/genmodes.cc: In function =E2=80=98int main(int, char**)=E2=80=99: gcc/gcc/genmodes.cc:2152:1: error: =E2=80=98gcc/build/genmodes.gcda=E2=80= =99 profile count data file not found [-Werror=3Dmissing-profile] 2152 | } | ^ gcc/gcc/gengtype-parse.cc: In function =E2=80=98void parse_file(const char*= )=E2=80=99: gcc/gcc/gengtype-parse.cc:1186:1: error: =E2=80=98gcc/build/gengtype-parse.= gcda=E2=80=99 profile count data file not found [-Werror=3Dmissing-profile] 1186 | } | ^ cc1plus: all warnings being treated as errors make[3]: *** [Makefile:2949: build/gengenrtl.o] =D0=9E=D1=88=D0=B8=D0=B1=D0= =BA=D0=B0 1 gcc/gcc/gengtype-parse.cc: In function =E2=80=98void parse_error(const char= *, ...)=E2=80=99: gcc/gcc/gengtype-parse.cc:142:21: error: =E2=80=98%s=E2=80=99 directive arg= ument is null [-Werror=3Dformat-overflow=3D] 142 | fprintf (stderr, "%s:%d: parse error: ", | ^~ Stable branches work just because -Werror is disabled. Note that autofeedback has a similar problem and it works it around with disabling -Werror: # Disable warnings as errors since inlining decisions with -fauto-profile # may result in additional warnings. STAGEautofeedback_CONFIGURE_FLAGS =3D $(filter-out --enable-werror-always,$(STAGE_CONFIGURE_FLAGS)) I suggest doling the same for `profiledbootstrap` as: --- a/Makefile.tpl +++ b/Makefile.tpl @@ -561,6 +561,10 @@ STAGEtrain_TFLAGS =3D $(filter-out -fchecking=3D1,$(STAGE3_TFLAGS)) STAGEfeedback_CFLAGS =3D $(STAGE4_CFLAGS) -fprofile-use -fprofile-reproducible=3Dparallel-runs STAGEfeedback_TFLAGS =3D $(STAGE4_TFLAGS) +# Disable warnings as errors for a few reasons: +# - sources for gen* binaries do not have .gcda files available +# - inlining decisions generate extra warnings +STAGEfeedback_CONFIGURE_FLAGS =3D $(filter-out --enable-werror-always,$(STAGE_CONFIGURE_FLAGS)) STAGEautoprofile_CFLAGS =3D $(filter-out -gtoggle,$(STAGE2_CFLAGS)) -g STAGEautoprofile_TFLAGS =3D $(STAGE2_TFLAGS)=