From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E6E9C385E83F; Mon, 15 Jan 2024 19:41:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E6E9C385E83F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705347714; bh=gbKGR2q/RsjKhQo1pXPHHaohdvvOaSxjp+Y7TKZVW48=; h=From:To:Subject:Date:From; b=Vl2L18FoX5XOpzl28FZhSO0t2a1THKW8/AHkX+DlrXz98Ur1KrdO9cTX95UHTT4vt X97FwJG2TF9vnf3cdCkaTQI5zSGMd5s97AJwWc9qxgB/k4iwBjMaeg1pHb5jdcPh2+ X1Y1fYdwWODZQQ3GjFc/r6HW7MBVrdX7m9Ht+M6s= From: "eddiejnolan at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113405] New: Can't access member type alias of concept-constrained class template specialization in global module fragment via alias template in different module Date: Mon, 15 Jan 2024 19:41:54 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eddiejnolan 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=3D113405 Bug ID: 113405 Summary: Can't access member type alias of concept-constrained class template specialization in global module fragment via alias template in different module Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: eddiejnolan at gmail dot com Target Milestone: --- This example shows GCC failing to resolve the member type alias "foobar" in= a concept-constrained specialization of class template "corge" when it's acce= ssed from module2 via an alias template in module1. Compiler explorer link: https://godbolt.org/z/4sh6xG6P4 Minimal reproduction: // CMakeLists.txt cmake_minimum_required(VERSION 3.28) project(repro CXX) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) add_library(module1) target_sources(module1 PUBLIC FILE_SET cxx_modules TYPE CXX_MODULES FILES module1.cpp ) target_include_directories(module1 PRIVATE "include/") add_library(module2) target_sources(module2 PUBLIC FILE_SET cxx_modules TYPE CXX_MODULES FILES module2.cpp ) target_link_libraries(module2 PUBLIC module1) // include/foo.h template concept foo =3D false; template concept bar =3D true; template struct corge {}; template struct corge {}; template struct corge { using foobar =3D int; }; // module1.cpp module; #include "foo.h" export module module1; export template using corge_alias =3D corge::foobar; // module2.cpp export module module2; import module1; struct foobaz{}; using quux =3D corge_alias;=