]>
Commit | Line | Data |
---|---|---|
5384b728 | 1 | 2002-08-07 Jakub Jelinek <jakub@redhat.com> |
2 | ||
3 | * tree-inline.c (remap_decl): Make sure DECL_TOO_LATE is clear for | |
4 | remapped labels. | |
5 | ||
6 | * gcc.c-torture/compile/20020807-1.c: New test. | |
7 | ||
8 | --- gcc/tree-inline.c.jj 2002-04-17 15:35:57.000000000 +0200 | |
9 | +++ gcc/tree-inline.c 2002-08-07 14:53:14.000000000 +0200 | |
10 | @@ -145,6 +145,9 @@ remap_decl (decl, id) | |
11 | t = copy_decl_for_inlining (decl, fn, | |
12 | VARRAY_TREE (id->fns, 0)); | |
13 | ||
14 | + if (TREE_CODE (t) == LABEL_DECL) | |
15 | + DECL_TOO_LATE (t) = 0; | |
16 | + | |
17 | /* The decl T could be a dynamic array or other variable size type, | |
18 | in which case some fields need to be remapped because they may | |
19 | contain SAVE_EXPRs. */ | |
20 | --- gcc/testsuite/gcc.c-torture/compile/20020807-1.c.jj 2002-08-07 14:55:26.000000000 +0200 | |
21 | +++ gcc/testsuite/gcc.c-torture/compile/20020807-1.c 2002-08-07 14:22:07.000000000 +0200 | |
22 | @@ -0,0 +1,33 @@ | |
23 | +int x; | |
24 | + | |
25 | +static int | |
26 | +__attribute__ ((noinline)) | |
27 | +foo (void) | |
28 | +{ | |
29 | + return 0; | |
30 | +} | |
31 | + | |
32 | +static void | |
33 | +__attribute__ ((noinline)) | |
34 | +bar (void) | |
35 | +{ | |
36 | +} | |
37 | + | |
38 | +static inline void | |
39 | +baz (void) | |
40 | +{ | |
41 | + char arr[x]; | |
42 | + | |
43 | +lab: | |
44 | + if (foo () == -1) | |
45 | + { | |
46 | + bar (); | |
47 | + goto lab; | |
48 | + } | |
49 | +} | |
50 | + | |
51 | +void | |
52 | +test (void) | |
53 | +{ | |
54 | + baz (); | |
55 | +} |