summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/guality/pr45003-1.c
blob: 7cef8f6284c8b814b1fe0cd78a1d9cc6013fb262 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* PR debug/45003 */
/* { dg-do run { target { 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 10 "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 19 "a" "0xffff8078" } } */
  return 0;
}

int
main ()
{
  unsigned short us = 0x8078;
  foo (&us);
  short s = -32648;
  bar (&s);
  return 0;
}