mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-24 04:10:29 +08:00
re PR c++/60353 (Firefox build failure #3 caused by r208157)
PR c++/60353 PR c++/55877 * decl2.c (tentative_decl_linkage): Don't mess with functions that are not yet defined. From-SVN: r208200
This commit is contained in:
parent
1ee6eb01a9
commit
7fce82f589
@ -1,3 +1,10 @@
|
||||
2014-02-27 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/60353
|
||||
PR c++/55877
|
||||
* decl2.c (tentative_decl_linkage): Don't mess with functions that
|
||||
are not yet defined.
|
||||
|
||||
2014-02-26 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/60347
|
||||
|
@ -2564,7 +2564,8 @@ tentative_decl_linkage (tree decl)
|
||||
be handled. */;
|
||||
else if (vague_linkage_p (decl))
|
||||
{
|
||||
if (TREE_CODE (decl) == FUNCTION_DECL)
|
||||
if (TREE_CODE (decl) == FUNCTION_DECL
|
||||
&& decl_defined_p (decl))
|
||||
{
|
||||
DECL_EXTERNAL (decl) = 1;
|
||||
DECL_NOT_REALLY_EXTERN (decl) = 1;
|
||||
@ -2586,11 +2587,8 @@ tentative_decl_linkage (tree decl)
|
||||
DECL_INTERFACE_KNOWN (decl) = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gcc_assert (TREE_CODE (decl) == VAR_DECL);
|
||||
maybe_commonize_var (decl);
|
||||
}
|
||||
else if (TREE_CODE (decl) == VAR_DECL)
|
||||
maybe_commonize_var (decl);
|
||||
}
|
||||
}
|
||||
|
||||
|
8
gcc/testsuite/g++.dg/other/anon6.C
Normal file
8
gcc/testsuite/g++.dg/other/anon6.C
Normal file
@ -0,0 +1,8 @@
|
||||
// PR c++/60353
|
||||
|
||||
struct A {
|
||||
A(int);
|
||||
};
|
||||
typedef struct {
|
||||
A format;
|
||||
} B;
|
Loading…
x
Reference in New Issue
Block a user