This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386]: Fix PR 41900, call *%esp shouldn't be generated because of CPU errata
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 3 Nov 2009 12:56:09 +0100
- Subject: Re: [PATCH, i386]: Fix PR 41900, call *%esp shouldn't be generated because of CPU errata
- References: <5787cf470911022348l14af710ei9118d9777147d6f3@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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