From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D7C213858D20; Fri, 1 Sep 2023 03:07:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D7C213858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693537625; bh=d2V/xwjJV2fog0M8y3pkYF5UlXZyGj0DJfUffCVoONc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ie/LeaUS2lKpkLn8gd0psfB3zfwu38qWeWtpdopzWm8jxYYyvl//WAVuDi10rQxD6 7by6G60GR791SnoDJEoI52KwCZGY/uQgVa23nAeciU+qxxqlE+JouDgXkn2HQl65S+ nrdyEgIdB4pfrpppxcg9Au1zqPicuN5wG0ImLp4o= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/111264] [14 regression] gcc.dg/plugin/analyzer_cpython_plugin.c breaks after r14-3580-g597b9ec69bca8a Date: Fri, 01 Sep 2023 03:07:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: efric at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed bug_status cf_reconfirmed_on 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=3D111264 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2023-09-01 --- Comment #3 from Andrew Pinski --- (In reply to Hans-Peter Nilsson from comment #1) > Also seen for cris-elf and m68k-linux > (https://gcc.gnu.org/pipermail/gcc-testresults/2023-August/794806.html). >=20 > Some experimentation says that this is a mismatch between the default C++ > version for the host/installed gcc (for me, C++11, I think) and the target > (C++17, right?). If you add "-std=3Dc++17" to the invocation line in gcc= .log, > compilation succeeds. Or, change the form of the newly introduced > declarations from > auto foobar =3D foo(); > to > foo foobar; > Not sure why the former is used, it seems negate the benefits of auto and > just be more typing. Beware: since I know Very Little C++ of the last > decades, I could be completely wrong. You are mostly correct. In C++17, Copy elision is guaranteed to be done here while in earlier versi= ons it is not and earlier versions of C++ require a copy/move constructor even = if copy elision is to be done. See https://en.cppreference.com/w/cpp/language/copy_elision for more informatio= n.=