+2010-05-12 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * targhooks.c (default_stack_protect_guard): Avoid sharing RTL
+ for __stack_chk_guard.
+
2010-05-11 Jakub Jelinek <jakub@redhat.com>
* c-opts.c (c_common_parse_file): If start_end_main_source_file,
if (t == NULL)
{
+ rtx x;
+
t = build_decl (UNKNOWN_LOCATION,
VAR_DECL, get_identifier ("__stack_chk_guard"),
ptr_type_node);
DECL_ARTIFICIAL (t) = 1;
DECL_IGNORED_P (t) = 1;
+ /* Do not share RTL as the declaration is visible outside of
+ current function. */
+ x = DECL_RTL (t);
+ RTX_FLAG (x, used) = 1;
+
stack_chk_guard_decl = t;
}
+2010-05-12 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * gcc.target/m68k/20100512-1.c: New.
+
2010-05-12 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/lto8.adb: New test.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -fstack-protector" } */
+/* { dg-require-effective-target fstack_protector } */
+/* There should be 2 references to __stack_chk_guard in every function. */
+/* { dg-final { scan-assembler-times "__stack_chk_guard" 4 } } */
+
+#include <stdlib.h>
+#include <string.h>
+void doTest1(void) {
+ volatile char foo[10];
+ memset((void *)foo, 1, 100);
+}
+void doTest2(void) {
+ volatile char foo[10];
+ memset((void *)foo, 1, 100);
+}