[Bug c++/69113] [6 Regression] ICE: in vague_linkage_p, at cp/decl2.c:1875 with -fno-weak
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 5 15:51:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69113
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Looks like this fixes it...
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 9a07e1e..a7212ca0 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -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
More information about the Gcc-bugs
mailing list