mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-08 09:41:09 +08:00
re PR c++/69113 (ICE: in vague_linkage_p, at cp/decl2.c:1875 with -fno-weak)
PR c++/69113 * decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set. * g++.dg/pr69113.C: New test. From-SVN: r232189
This commit is contained in:
parent
20b8d7342c
commit
73f0dae2a4
@ -1,3 +1,8 @@
|
||||
2016-01-09 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/69113
|
||||
* decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set.
|
||||
|
||||
2016-01-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/69164
|
||||
|
@ -1820,7 +1820,8 @@ comdat_linkage (tree decl)
|
||||
}
|
||||
}
|
||||
|
||||
DECL_COMDAT (decl) = 1;
|
||||
if (TREE_PUBLIC (decl))
|
||||
DECL_COMDAT (decl) = 1;
|
||||
}
|
||||
|
||||
/* For win32 we also want to put explicit instantiations in
|
||||
|
@ -1,3 +1,8 @@
|
||||
2016-01-09 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/69113
|
||||
* g++.dg/pr69113.C: New test.
|
||||
|
||||
2016-01-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/50865
|
||||
|
17
gcc/testsuite/g++.dg/pr69113.C
Normal file
17
gcc/testsuite/g++.dg/pr69113.C
Normal file
@ -0,0 +1,17 @@
|
||||
// PR c++/69113
|
||||
// { dg-do compile }
|
||||
// { dg-options "-fno-weak" }
|
||||
|
||||
struct foo
|
||||
{
|
||||
static void bar ()
|
||||
{
|
||||
struct baz
|
||||
{
|
||||
static void m ()
|
||||
{
|
||||
static int n;
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user