re PR c++/30297 (ICE with extern "C" and inheritance)
gcc/cp 2007-11-08 Andrew Pinski <pinskia@gmail.com> PR c++/30297: * tree.c (decl_linkage): Fields have no linkage. gcc/testsuite PR c++/30297: * g++.dg/inherit/pr30297.C: New file. From-SVN: r130018
This commit is contained in:
parent
061c5ee427
commit
c02cdc25dc
@ -1,3 +1,8 @@
|
||||
2007-11-08 Andrew Pinski <pinskia@gmail.com>
|
||||
|
||||
PR c++/30297:
|
||||
* tree.c (decl_linkage): Fields have no linkage.
|
||||
|
||||
2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* class.c (build_ctor_vtbl_group): Lay out the new type and decl.
|
||||
|
@ -2493,6 +2493,10 @@ decl_linkage (tree decl)
|
||||
if (!DECL_NAME (decl))
|
||||
return lk_none;
|
||||
|
||||
/* Fields have no linkage. */
|
||||
if (TREE_CODE (decl) == FIELD_DECL)
|
||||
return lk_none;
|
||||
|
||||
/* Things that are TREE_PUBLIC have external linkage. */
|
||||
if (TREE_PUBLIC (decl))
|
||||
return lk_external;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2007-11-08 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
PR c++/30297:
|
||||
* g++.dg/inherit/pr30297.C: New file.
|
||||
|
||||
2007-11-08 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
* gcc.dg/compat/struct-layout-1_generate.c (dg-options) Add
|
||||
|
11
gcc/testsuite/g++.dg/inherit/pr30297.C
Normal file
11
gcc/testsuite/g++.dg/inherit/pr30297.C
Normal file
@ -0,0 +1,11 @@
|
||||
// Regression test for ICE from PR c++/30297.
|
||||
|
||||
struct A
|
||||
{
|
||||
int i;
|
||||
};
|
||||
|
||||
extern "C" struct B : A
|
||||
{
|
||||
A::i;
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user