mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-01 07:44:05 +08:00
re PR middle-end/34134 (ICE when using __builtin_stack_restore)
PR middle-end/34134 * stmt.c (expand_stack_restore): Call expand_normal on var to get rtx for it instead of assuming it will be a VAR_DECL. * gcc.c-torture/compile/20071117-1.c: New test. From-SVN: r130609
This commit is contained in:
parent
ba7963084e
commit
b9f9b2101b
@ -1,3 +1,9 @@
|
||||
2007-12-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/34134
|
||||
* stmt.c (expand_stack_restore): Call expand_normal on var to get
|
||||
rtx for it instead of assuming it will be a VAR_DECL.
|
||||
|
||||
2007-12-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
|
||||
|
||||
* c-parser (c_parser_statement_after_labels): Move error from here...
|
||||
|
@ -1995,7 +1995,7 @@ expand_stack_save (void)
|
||||
void
|
||||
expand_stack_restore (tree var)
|
||||
{
|
||||
rtx sa = DECL_RTL (var);
|
||||
rtx sa = expand_normal (var);
|
||||
|
||||
emit_stack_restore (SAVE_BLOCK, sa, NULL_RTX);
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2007-12-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/34134
|
||||
* gcc.c-torture/compile/20071117-1.c: New test.
|
||||
|
||||
2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
|
||||
|
||||
PR c++/34101
|
||||
|
13
gcc/testsuite/gcc.c-torture/compile/20071117-1.c
Normal file
13
gcc/testsuite/gcc.c-torture/compile/20071117-1.c
Normal file
@ -0,0 +1,13 @@
|
||||
/* PR middle-end/34134 */
|
||||
|
||||
extern void bar (void *, int);
|
||||
|
||||
int foo (int i)
|
||||
{
|
||||
char *p = __builtin_stack_save ();
|
||||
void *q = __builtin_alloca (i);
|
||||
bar (q, i);
|
||||
__builtin_stack_restore (p);
|
||||
bar ("", 0);
|
||||
return 6;
|
||||
}
|
Loading…
Reference in New Issue
Block a user