re PR rtl-optimization/56732 (ICE in advance_target_bb)
gcc/ChangeLog 2013-05-02 Greta Yorsh <Greta.Yorsh@arm.com> PR target/56732 * config/arm/arm.c (arm_expand_epilogue): Check really_return before generating simple_return for naked functions. gcc/testsuite/ChangeLog 2013-05-02 Greta Yorsh <Greta.Yorsh@arm.com> PR target/56732 * gcc.target/arm/pr56732-1.c: New test. From-SVN: r198547
This commit is contained in:
parent
7b920a9ac3
commit
f3a81b39c0
4 changed files with 33 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2013-05-02 Greta Yorsh <Greta.Yorsh@arm.com>
|
||||
|
||||
PR target/56732
|
||||
* config/arm/arm.c (arm_expand_epilogue): Check really_return before
|
||||
generating simple_return for naked functions.
|
||||
|
||||
2013-05-02 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
PR middle-end/56988
|
||||
|
|
|
@ -24114,7 +24114,8 @@ arm_expand_epilogue (bool really_return)
|
|||
if (IS_NAKED (func_type)
|
||||
|| (IS_VOLATILE (func_type) && TARGET_ABORT_NORETURN))
|
||||
{
|
||||
emit_jump_insn (simple_return_rtx);
|
||||
if (really_return)
|
||||
emit_jump_insn (simple_return_rtx);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2013-05-02 Greta Yorsh <Greta.Yorsh@arm.com>
|
||||
|
||||
PR target/56732
|
||||
* gcc.target/arm/pr56732-1.c: New test.
|
||||
|
||||
2013-05-02 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
PR middle-end/56988
|
||||
|
|
20
gcc/testsuite/gcc.target/arm/pr56732-1.c
Normal file
20
gcc/testsuite/gcc.target/arm/pr56732-1.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target naked_functions } */
|
||||
/* { dg-options "-O2 -Wall" } */
|
||||
extern void bar();
|
||||
|
||||
void __attribute__((__naked__))
|
||||
foo(void)
|
||||
{
|
||||
bar ();
|
||||
}
|
||||
|
||||
int __attribute__((naked))
|
||||
zoo (int a, int b, int c, int d, int e, int f)
|
||||
{
|
||||
bar ();
|
||||
return e;
|
||||
}
|
||||
/* Verify that __attribute__((naked)) produces a naked function that
|
||||
does not use bx to return. */
|
||||
/* { dg-final { scan-assembler-not "\tbx\tlr" } } */
|
Loading…
Add table
Reference in a new issue