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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [stackalign/] [nested-1.c] - Blame information for rev 698

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
3
 
4
#include "check.h"
5
 
6
#ifndef ALIGNMENT
7
#define ALIGNMENT       64
8
#endif
9
 
10
typedef int aligned __attribute__((aligned(ALIGNMENT)));
11
 
12
int global;
13
 
14
void
15
foo (void)
16
{
17
  aligned j;
18
 
19
  void bar ()
20
    {
21
      aligned i;
22
 
23
      if (check_int (&i,  __alignof__(i)) != i)
24
        abort ();
25
 
26
      if (check_int (&j,  __alignof__(j)) != j)
27
        abort ();
28
 
29
      j = -20;
30
    }
31
  bar ();
32
 
33
  if (j != -20)
34
    abort ();
35
 
36
  if (check_int (&j,  __alignof__(j)) != j)
37
    abort ();
38
}
39
 
40
int
41
main()
42
{
43
  foo ();
44
  return 0;
45
}

powered by: WebSVN 2.1.0

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