From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 00F743858D38; Mon, 22 Apr 2024 13:01:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 00F743858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713790865; bh=onzBZMomSxHNOnf/NYXDsZ6v8L9XpQE0+iZdj+WNPHc=; h=From:To:Subject:Date:From; b=Nqt9RyXEOMMDoch/o6hlECdXE0oQ+GnS05ip1zpTiVxjaRRONutHW03ky/iwrunqu jmbeULSS3h3uuf76sGrSNl9m2ofKtpWj3HYw1LfxwgN/hl7gf8jJ33UVxQg/LHvfdb ITk+A8QOfsMod9XBOHtpAguBuXDGfbtmTkAfLixQ= From: "wdehnen64 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114804] New: rejects valid code Date: Mon, 22 Apr 2024 13:01:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wdehnen64 at gmail dot com 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=3D114804 Bug ID: 114804 Summary: rejects valid code Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wdehnen64 at gmail dot com Target Milestone: --- gcc fails to compile the following =3D=3D=3Dtest.cc=3D=3D=3D template struct blurb=20 { constexpr static int d=3DD; }; template struct pant { int foo=3D0; }; template struct bug : Base { using base =3D Base; using base::d; using tool =3D blurb; struct problem : pant { using pant::foo; }; void bar() const { problem b; } }; template struct bug< blurb<2> >; =3D=3D=3DTerminal=3D=3D=3D > gcc-13 src/bug.cc -c src/bug.cc: In instantiation of 'struct bug >::problem': src/bug.cc:17:17: required from here src/bug.cc:13:12: error: 'd' was not declared in this scope 13 | struct problem : pant { using pant::foo; }; | ^~~~~~~ src/bug.cc:13:53: error: type 'pant >' is not a base type for type 'bug >::problem' 13 | struct problem : pant { using pant::foo; }; | ^~~ =3D=3D=3DNote=3D=3D=3D last version known to be correct: gcc-10.5.0 (gcc-11, gcc-12 also fail) =3D=3D=3DVersion=3D=3D=3D > g++-13 -v Using built-in specs. COLLECT_GCC=3Dg++-13 COLLECT_LTO_WRAPPER=3D/usr/local/Cellar/gcc/13.2.0/bin/../libexec/gcc/x86_6= 4-apple-darwin23/13/lto-wrapper Target: x86_64-apple-darwin23 Configured with: ../configure --prefix=3D/usr/local/opt/gcc --libdir=3D/usr/local/opt/gcc/lib/gcc/current --disable-nls --enable-checking=3Drelease --with-gcc-major-version-only --enable-languages=3Dc,c++,objc,obj-c++,fortran --program-suffix=3D-13 --with-gmp=3D/usr/local/opt/gmp --with-mpfr=3D/usr/local/opt/mpfr --with-mpc=3D/usr/local/opt/libmpc --with-isl=3D/usr/local/opt/isl --with-zstd=3D/usr/local/opt/zstd --with-pkgversion=3D'Homebrew GCC 13.2.0' --with-bugurl=3Dhttps://github.com/Homebrew/homebrew-core/issues --with-system-zlib --build=3Dx86_64-apple-darwin23 --with-sysroot=3D/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 13.2.0 (Homebrew GCC 13.2.0)=