Commit 28c84b62 by Jakub Jelinek Committed by Jakub Jelinek

re PR target/85984 (ICE in create_pseudo_cfg, at dwarf2cfi.c:2874)

	PR target/85984
	* bb-reorder.c (pass_partition_blocks::gate): Return false for
	functions with naked attribute.

	* gcc.target/i386/pr85984.c: New test.

From-SVN: r261037
parent 8b8003ed
2018-05-31 Jakub Jelinek <jakub@redhat.com>
PR target/85984
* bb-reorder.c (pass_partition_blocks::gate): Return false for
functions with naked attribute.
2018-05-31 Uros Bizjak <ubizjak@gmail.com> 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
* config/i386/sse.md (avx_vec_concat<mode>): * config/i386/sse.md (avx_vec_concat<mode>):
......
...@@ -2928,8 +2928,8 @@ pass_partition_blocks::gate (function *fun) ...@@ -2928,8 +2928,8 @@ pass_partition_blocks::gate (function *fun)
{ {
/* The optimization to partition hot/cold basic blocks into separate /* The optimization to partition hot/cold basic blocks into separate
sections of the .o file does not work well with linkonce or with sections of the .o file does not work well with linkonce or with
user defined section attributes. Don't call it if either case user defined section attributes or with naked attribute. Don't call
arises. */ it if either case arises. */
return (flag_reorder_blocks_and_partition return (flag_reorder_blocks_and_partition
&& optimize && optimize
/* See pass_reorder_blocks::gate. We should not partition if /* See pass_reorder_blocks::gate. We should not partition if
...@@ -2937,6 +2937,7 @@ pass_partition_blocks::gate (function *fun) ...@@ -2937,6 +2937,7 @@ pass_partition_blocks::gate (function *fun)
&& optimize_function_for_speed_p (fun) && optimize_function_for_speed_p (fun)
&& !DECL_COMDAT_GROUP (current_function_decl) && !DECL_COMDAT_GROUP (current_function_decl)
&& !lookup_attribute ("section", DECL_ATTRIBUTES (fun->decl)) && !lookup_attribute ("section", DECL_ATTRIBUTES (fun->decl))
&& !lookup_attribute ("naked", DECL_ATTRIBUTES (fun->decl))
/* Workaround a bug in GDB where read_partial_die doesn't cope /* Workaround a bug in GDB where read_partial_die doesn't cope
with DIEs with DW_AT_ranges, see PR81115. */ with DIEs with DW_AT_ranges, see PR81115. */
&& !(in_lto_p && MAIN_NAME_P (DECL_NAME (fun->decl)))); && !(in_lto_p && MAIN_NAME_P (DECL_NAME (fun->decl))));
......
2018-05-31 Jakub Jelinek <jakub@redhat.com>
PR target/85984
* gcc.target/i386/pr85984.c: New test.
2018-05-31 Martin Sebor <msebor@redhat.com> 2018-05-31 Martin Sebor <msebor@redhat.com>
PR c/82063 PR c/82063
......
/* PR target/85984 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
int foo (void);
void __attribute__((naked))
bar (void)
{
if (!foo ())
__builtin_abort ();
}
void
baz (void)
{
bar ();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment