blob: 5823ce76842fc6cc84587f971602b492452ef919 [file] [log] [blame]
/* PR debug/45003 */
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && lp64 } } } */
/* { dg-options "-g" } */
int __attribute__((noinline))
foo (unsigned short *p)
{
int a = *p;
asm volatile ("nop");
asm volatile ("nop" : : "D" (a)); /* { dg-final { gdb-test . "a" "0x8078" } } */
return 0;
}
int __attribute__((noinline))
bar (short *p)
{
unsigned int a = *p;
asm volatile ("nop");
asm volatile ("nop" : : "D" (a)); /* { dg-final { gdb-test . "a" "0xffff8078" } } */
return 0;
}
int
main ()
{
unsigned short us = 0x8078;
foo (&us);
short s = -32648;
bar (&s);
return 0;
}