OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [guality/] [pr36728-1.c] - Blame information for rev 753

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* PR debug/36728 */
2
/* { dg-do run } */
3
/* { dg-options "-g" } */
4
 
5
int __attribute__((noinline))
6
foo (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
7
{
8
  char *x = __builtin_alloca (arg7);
9
  int __attribute__ ((aligned(32))) y;
10
 
11
  y = 2;
12
  asm volatile ("" : "=m" (y) : "m" (y));
13
  x[0] = 25;
14
  asm volatile ("" : "=m" (x[0]) : "m" (x[0]));
15
  return y;
16
}
17
 
18
/* On s390(x) r2 and r3 are (depending on the optimization level) used
19
   when adjusting the addresses in order to meet the alignment
20
   requirements above.  They usually hold the function arguments arg1
21
   and arg2.  So it is expected that these values are unavailable in
22
   some of these tests.  */
23
 
24
/* { dg-final { gdb-test 12 "arg1" "1" { target { ! "s390*-*-*" } } } }*/
25
/* { dg-final { gdb-test 12 "arg2" "2" { target { ! "s390*-*-*" } } } }*/
26
/* { dg-final { gdb-test 12 "arg3" "3" } } */
27
/* { dg-final { gdb-test 12 "arg4" "4" } } */
28
/* { dg-final { gdb-test 12 "arg5" "5" } } */
29
/* { dg-final { gdb-test 12 "arg6" "6" } } */
30
/* { dg-final { gdb-test 12 "arg7" "30" } } */
31
/* { dg-final { gdb-test 12 "y" "2" } } */
32
/* { dg-final { gdb-test 14 "arg1" "1" { target { ! "s390*-*-*" } } } }*/
33
/* { dg-final { gdb-test 14 "arg2" "2" { target { ! "s390*-*-*" } } } }*/
34
/* { dg-final { gdb-test 14 "arg3" "3" } } */
35
/* { dg-final { gdb-test 14 "arg4" "4" } } */
36
/* { dg-final { gdb-test 14 "arg5" "5" } } */
37
/* { dg-final { gdb-test 14 "arg6" "6" } } */
38
/* { dg-final { gdb-test 14 "arg7" "30" } } */
39
/* { dg-final { gdb-test 14 "*x" "(char) 25" } } */
40
/* { dg-final { gdb-test 14 "y" "2" } } */
41
 
42
int
43
main ()
44
{
45
  int l = 0;
46
  asm volatile ("" : "=r" (l) : "0" (l));
47
  foo (l + 1, l + 2, l + 3, l + 4, l + 5, l + 6, l + 30);
48
  return 0;
49
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.