gcc/
PR ipa/63621
* symtab.c (symtab_node::verify): Check for section attribute before
asserting something isn't in a section and a comdat group.
From-SVN: r218476
+2014-12-07 Trevor Saunders <tsaunders@mozilla.com>
+
+ * symtab.c (symtab_node::verify): Check for section attribute before
+ asserting something isn't in a section and a comdat group.
+
2014-12-07 Oleg Endo <olegendo@gcc.gnu.org>
PR target/50751
error_found = true;
}
if (get_section () && get_comdat_group ()
- && !implicit_section)
+ && !implicit_section
+ && !lookup_attribute ("section", DECL_ATTRIBUTES (decl)))
{
error ("Both section and comdat group is set");
error_found = true;
--- /dev/null
+// { dg-do compile }
+ class A
+{
+ public:
+ int __attribute__((section("a"))) f1(bool);
+ int f2(void *);
+ int f3(bool);
+};
+
+inline int A::f1(bool b)
+{
+ static int c;
+ if (c)
+ ;
+ return 0;
+}
+
+inline int A::f3(bool b)
+{
+ static __attribute__((section(""))) int c;
+ if (c)
+ ;
+ return 0;
+}
+
+int A::f2(void *c)
+{
+ return f1(c) + f3(c);
+}