This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][LTO] Fix PR48437
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Diego Novillo <dnovillo at google dot com>
- Date: Wed, 7 Dec 2011 16:11:12 +0100
- Subject: Re: [PATCH][LTO] Fix PR48437
- References: <alpine.LNX.2.00.1112071550090.4527@zhemvz.fhfr.qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Dec 07, 2011 at 03:52:35PM +0100, Richard Guenther wrote:
> *** gcc/testsuite/gcc.dg/guality/pr48437.c (revision 0)
> --- gcc/testsuite/gcc.dg/guality/pr48437.c (revision 0)
> ***************
> *** 0 ****
> --- 1,15 ----
> + /* PR lto/48437 */
> + /* { dg-do run } */
> + /* { dg-options "-g" } */
> +
> + int i __attribute__((used));
> + int main()
> + {
> + volatile int i;
> + for (i = 3; i < 7; ++i)
> + {
> + extern int i; /* { dg-final { gdb-test 7 "i" "0" } } */
> + asm volatile ("" : : : "memory");
Do you really want to test it on line 7 ({ of after main())?
I'd expect you want to look at it on the line where asm volatile is,
and make sure you can put a breakpoint on it:
#include "../nop.h"
early and use NOP instead of "" as the asm pattern.
Jakub