This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386]: Fix PR 41900, call *%esp shouldn't be generated because of CPU errata


On Tue, Nov 03, 2009 at 08:48:15AM +0100, Uros Bizjak wrote:
> 2009-11-03  Uros Bizjak  <ubizjak@gmail.com>
> 
> 	PR target/41900
> 	* gcc.target/i386/pr41900.c: New test.

The testsuite fails on i?86-linux.
I believe it is very rare these days to have stack executable for security
reasons.

IMHO you should change the test into dg-do compile with some scan-assembler.

> --- testsuite/gcc.target/i386/pr41900.c	(revision 0)
> +++ testsuite/gcc.target/i386/pr41900.c	(revision 0)
> @@ -0,0 +1,11 @@
> +/* { dg-do run } */
> +/* { dg-require-effective-target ilp32 } */
> +/* { dg-options "-O2 -fomit-frame-pointer -mpreferred-stack-boundary=2" } */
> +
> +int main ()
> +{
> +  unsigned code = 0xc3;
> +
> +  ((void (*)(void)) &code) ();
> +  return 0;
> +}

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]