Commit 6fc4ecbc by Jakub Jelinek Committed by Jakub Jelinek

re PR rtl-optimization/11304 (Wrong code production with -fomit-frame-pointer)

	PR rtl-optimization/11304
	* gcc.target/i386/call-1.c (set_eax): Add "eax" clobber.
	* gcc.target/i386/call-2.c: New test.

From-SVN: r268562
parent 0d806438
2019-02-05 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/11304
* gcc.target/i386/call-1.c (set_eax): Add "eax" clobber.
* gcc.target/i386/call-2.c: New test.
2019-02-05 Marek Polacek <polacek@redhat.com>
PR c++/89158 - by-value capture of constexpr variable broken.
......
......@@ -11,7 +11,7 @@ volatile int r;
void set_eax(int val)
{
__asm__ __volatile__ ("mov %0, %%eax" : : "m" (val));
__asm__ __volatile__ ("mov %0, %%eax" : : "m" (val) : "eax");
}
void foo(int val)
......
/* PR optimization/11304 */
/* Originator: <manuel.serrano@sophia.inria.fr> */
/* { dg-do run } */
/* { dg-options "-O -fomit-frame-pointer" } */
/* Verify that %eax is always restored after a call. */
__attribute__((noipa)) void set_eax(int val);
__attribute__((noipa)) void foo(int val);
__attribute__((noipa)) int bar(int x);
#include "call-1.c"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment