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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [stack2.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/51060
2
// { dg-options "-Os -Wframe-larger-than=2000 -Werror" }
3
 
4
// Shows a problem of not re-using stack space:
5
// Compile as: g++ -c test_stack_reuse.cpp -o /dev/null -Wframe-larger-than=2048 -Werror -Os
6
// Result: warning: the frame size of 10240 bytes is larger than 2048 bytes [-Wframe-larger-than=]
7
//
8
 
9
struct StackObject
10
{
11
  StackObject();
12
  char buffer[1024];
13
};
14
 
15
void Test()
16
{
17
#define TEST_SUB() \
18
  StackObject();
19
 
20
#define TEST() \
21
        TEST_SUB() \
22
        TEST_SUB() \
23
        TEST_SUB() \
24
        TEST_SUB() \
25
        TEST_SUB() \
26
        TEST_SUB() \
27
        TEST_SUB() \
28
        TEST_SUB() \
29
        TEST_SUB() \
30
        TEST_SUB()
31
 
32
  TEST()
33
}

powered by: WebSVN 2.1.0

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