mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-13 05:43:45 +08:00
re PR other/43564 (ICE on code with optimize attribute and inlining)
PR 43564 * toplev.c (process_options): Set optimization_default_node and optimization_current_node. * opts.c (decode_options): Don't set optimization_default_node and optimization_current_node. testsuite/ PR 43564 * gcc.dg/pr43564.c: New test. From-SVN: r157795
This commit is contained in:
parent
10fa280a98
commit
3b34d92c9c
@ -1,3 +1,11 @@
|
||||
2010-03-29 Jie Zhang <jie@codesourcery.com>
|
||||
|
||||
PR 43564
|
||||
* toplev.c (process_options): Set optimization_default_node
|
||||
and optimization_current_node.
|
||||
* opts.c (decode_options): Don't set optimization_default_node
|
||||
and optimization_current_node.
|
||||
|
||||
2010-03-29 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* config/rtems.h: Abandon -qrtems_debug.
|
||||
|
@ -1034,6 +1034,7 @@ decode_options (unsigned int argc, const char **argv)
|
||||
flag_pic = flag_pie;
|
||||
if (flag_pic && !flag_pie)
|
||||
flag_shlib = 1;
|
||||
first_time_p = false;
|
||||
}
|
||||
|
||||
if (optimize == 0)
|
||||
@ -1112,13 +1113,6 @@ decode_options (unsigned int argc, const char **argv)
|
||||
flag_ira_algorithm = IRA_ALGORITHM_PRIORITY;
|
||||
}
|
||||
|
||||
/* Save the current optimization options if this is the first call. */
|
||||
if (first_time_p)
|
||||
{
|
||||
optimization_default_node = build_optimization_node ();
|
||||
optimization_current_node = optimization_default_node;
|
||||
first_time_p = false;
|
||||
}
|
||||
if (flag_conserve_stack)
|
||||
{
|
||||
if (!PARAM_SET_P (PARAM_LARGE_STACK_FRAME))
|
||||
|
@ -1,3 +1,8 @@
|
||||
2010-03-29 Jie Zhang <jie@codesourcery.com>
|
||||
|
||||
PR 43564
|
||||
* gcc.dg/pr43564.c: New test.
|
||||
|
||||
2010-03-29 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/43551
|
||||
|
16
gcc/testsuite/gcc.dg/pr43564.c
Normal file
16
gcc/testsuite/gcc.dg/pr43564.c
Normal file
@ -0,0 +1,16 @@
|
||||
/* { dg-options "-O0" } */
|
||||
/* { dg-do compile } */
|
||||
|
||||
static inline __attribute__ ((__always_inline__))
|
||||
unsigned __clz (unsigned input)
|
||||
{
|
||||
unsigned output;
|
||||
__asm__ __volatile__ ("clz %0, %1":"=r" (output):"r" (input));
|
||||
}
|
||||
__attribute__ ((optimize ("O2")))
|
||||
void foo ()
|
||||
{
|
||||
unsigned a;
|
||||
unsigned b;
|
||||
a = __clz (b);
|
||||
}
|
@ -2148,6 +2148,10 @@ process_options (void)
|
||||
"for correctness");
|
||||
flag_omit_frame_pointer = 0;
|
||||
}
|
||||
|
||||
/* Save the current optimization options. */
|
||||
optimization_default_node = build_optimization_node ();
|
||||
optimization_current_node = optimization_default_node;
|
||||
}
|
||||
|
||||
/* This function can be called multiple times to reinitialize the compiler
|
||||
|
Loading…
Reference in New Issue
Block a user