mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-10 10:26:16 +08:00
c++: ICE with header-units [PR 99071]
This ICE was caused by dereferencing the wrong pointer and not finding the expected thing there. Pointers are like that. PR c++/99071 gcc/cp/ * name-lookup.c (maybe_record_mergeable_decl): Deref the correct pointer. gcc/testsuite/ * g++.dg/modules/pr99071_a.H: New. * g++.dg/modules/pr99071_b.H: New.
This commit is contained in:
parent
06505e701d
commit
d46c7e2c54
@ -3525,7 +3525,7 @@ maybe_record_mergeable_decl (tree *slot, tree name, tree decl)
|
||||
if (!partition)
|
||||
{
|
||||
binding_slot &orig
|
||||
= BINDING_VECTOR_CLUSTER (*gslot, 0).slots[BINDING_SLOT_CURRENT];
|
||||
= BINDING_VECTOR_CLUSTER (*slot, 0).slots[BINDING_SLOT_CURRENT];
|
||||
|
||||
if (!STAT_HACK_P (tree (orig)))
|
||||
orig = stat_hack (tree (orig));
|
||||
|
6
gcc/testsuite/g++.dg/modules/pr99071_a.H
Normal file
6
gcc/testsuite/g++.dg/modules/pr99071_a.H
Normal file
@ -0,0 +1,6 @@
|
||||
// PR 99071 ICE with global-module merging
|
||||
// { dg-additional-options -fmodule-header }
|
||||
// { dg-module-cmi {} }
|
||||
|
||||
template<typename T>
|
||||
void begin (T *);
|
8
gcc/testsuite/g++.dg/modules/pr99071_b.H
Normal file
8
gcc/testsuite/g++.dg/modules/pr99071_b.H
Normal file
@ -0,0 +1,8 @@
|
||||
// PR 99071 ICE with global-module merging
|
||||
// { dg-additional-options -fmodule-header }
|
||||
// { dg-module-cmi {} }
|
||||
|
||||
import "pr99071_a.H";
|
||||
|
||||
template<typename T>
|
||||
void begin(T &);
|
Loading…
x
Reference in New Issue
Block a user