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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [stack-usage-2.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-Wstack-usage=512" } */
3
 
4
int foo1 (void)
5
{
6
  char arr[16];
7
  arr[0] = 1;
8
  return 0;
9
} /* { dg-bogus "stack usage" } */
10
 
11
int foo2 (void)
12
{
13
  char arr[1024];
14
  arr[0] = 1;
15
  return 0;
16
} /* { dg-warning "stack usage is \[0-9\]* bytes" } */
17
 
18
int foo3 (void)
19
{
20
  char arr[1024] __attribute__((aligned (512)));
21
  arr[0] = 1;
22
  /* Force dynamic realignment of argument pointer.  */
23
  __builtin_apply ((void (*)()) foo2, 0, 0);
24
  return 0;
25
 
26
} /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
27
 
28
int foo4 (int n)
29
{
30
  char arr[n];
31
  arr[0] = 1;
32
  return 0;
33
} /* { dg-warning "stack usage might be unbounded" } */

powered by: WebSVN 2.1.0

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