]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: Duplicate namespace bindings [PR 99245]
authorNathan Sidwell <nathan@acm.org>
Fri, 5 Mar 2021 20:49:34 +0000 (12:49 -0800)
committerNathan Sidwell <nathan@acm.org>
Fri, 5 Mar 2021 20:54:00 +0000 (12:54 -0800)
commit9e64dd6b3f6706de571c6ed3c4b7a8c8b67f22b7
treeb79057eb3e58ba87d4acfcb499b08a20ff59903b
parentb1bee29167df6b0fbc9a4c8d06e2acbf3367af47
c++: Duplicate namespace bindings [PR 99245]

Header units can declare the same entity, and this can lead to one of
them containing a (non-using) binding to an import.  If one gets the
cluster ordering just right, an assert will trigger.  Relax that assert.

PR c++/99245
gcc/cp/
* module.cc (module_state::write_cluster): Relax binding assert.
gcc/testsuite/
* g++.dg/modules/pr99245_a.H: New.
* g++.dg/modules/pr99245_b.H: New.
gcc/cp/module.cc
gcc/testsuite/g++.dg/modules/pr99245_a.H [new file with mode: 0644]
gcc/testsuite/g++.dg/modules/pr99245_b.H [new file with mode: 0644]