This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug testsuite/49503] Incorrect stack alignment, produced by inline assembler in tests gcc.target/i386/cleanup-1.c and gcc.target/i386/cleanup-2.c
- From: "michael.v.zolotukhin at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 23 Jun 2011 16:03:34 +0000
- Subject: [Bug testsuite/49503] Incorrect stack alignment, produced by inline assembler in tests gcc.target/i386/cleanup-1.c and gcc.target/i386/cleanup-2.c
- Auto-submitted: auto-generated
- References: <bug-49503-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49503
--- Comment #8 from Michael Zolotukhin <michael.v.zolotukhin at gmail dot com> 2011-06-23 16:03:32 UTC ---
(In reply to comment #6)
> (In reply to comment #4)
> > Created attachment 24584 [details]
> > Test showing that cleanup-* tests are not quite correct.
>
> Wrong test. You don't know the alignment of buf.
> You should put an alignment attribute on buf.
I added new test, with align attribute.
Compiler sometimes could make stack aligned (accidentally), and the bug
wouldn't show up.
To watch the fail, try use following command line:
gcc cleanup-regression-2.c -O0 -lm -fno-inline -fexceptions
-fnon-call-exceptions -fasynchronous-unwind-tables && ./a.out