2008-05-26 Kai Tietz <kai.tietz@onevision.com>
PR/36321
* config/i386/i386.md (allocate_stack_worker_64): Make sure argument operand in
rax isn't removed.
2008-05-26 Kai Tietz <kai.tietz@onevision.com>
* gcc-c.torture/execute/pr36321.c: New.
From-SVN: r135921
+2008-05-26 Kai Tietz <kai.tietz@onevision.com>
+
+ PR/36321
+ * config/i386/i386.md (allocate_stack_worker_64): Make sure
+ argument operand in rax isn't removed.
+
2008-05-26 Richard Guenther <rguenther@suse.de>
PR middle-end/36300
(set_attr "length" "5")])
(define_insn "allocate_stack_worker_64"
- [(set (match_operand:DI 0 "register_operand" "=a")
+ [(set (match_operand:DI 0 "register_operand" "+a")
(unspec_volatile:DI [(match_dup 0)] UNSPECV_STACK_PROBE))
(set (reg:DI SP_REG) (minus:DI (reg:DI SP_REG) (match_dup 0)))
(clobber (reg:DI R10_REG))
+2008-05-26 Kai Tietz <kai.tietz@onevision.com>
+
+ * gcc-c.torture/execute/pr36321.c: New.
+
2008-05-26 Richard Guenther <rguenther@suse.de>
PR middle-end/36300
--- /dev/null
+extern void abort (void);
+
+extern __SIZE_TYPE__ strlen (const char *);
+void foo(char *str)
+{
+ int len2 = strlen (str);
+ char *a = (char *) __builtin_alloca (0);
+ char *b = (char *) __builtin_alloca (len2*3);
+
+ if ((int) (a-b) < (len2*3))
+ {
+#ifdef _WIN32
+ abort ();
+#endif
+ return;
+ }
+}
+
+int main(int argc, char **argv)
+{
+ foo (argv[0]);
+ return 0;
+}
+