PR c++/36959
* decl2.c (cxx_callgraph_analyze_expr): Don't reference a function
just because a static variable in it is needed unless -frepo.
From-SVN: r153878
2009-11-03 Jason Merrill <jason@redhat.com>
+ PR c++/36959
+ * decl2.c (cxx_callgraph_analyze_expr): Don't reference a function
+ just because a static variable in it is needed unless -frepo.
+
PR c++/41876
* parser.c (cp_parser_type_specifier_seq): Rename is_condition to
is_declaration.
mark_decl_referenced (vtbl);
}
else if (DECL_CONTEXT (t)
+ && flag_use_repository
&& TREE_CODE (DECL_CONTEXT (t)) == FUNCTION_DECL)
/* If we need a static variable in a function, then we
need the containing function. */
+2009-11-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/36959
+ * g++.dg/opt/inline16.C: New.
+
2009-11-03 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/stack_check.adb1: New test.
--- /dev/null
+// PR c++/36959
+// We shouldn't have to emit fromSlotB just because we need shuf_BZZZ.
+// { dg-options -O }
+// { dg-final { scan-assembler-not "_ZL9fromSlotBv" } }
+
+static inline int *fromSlotB(void)
+{
+ static int shuf_BZZZ = 1;
+ return &shuf_BZZZ;
+}
+
+int *p;
+
+int main(void)
+{
+ p = fromSlotB();
+ return (*p != 1);
+}
+