public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "iains at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/46916] gcc.dg/torture/stackalign/non-local-goto-[1,2].c ICEs compiler due to r167727
Date: Tue, 14 Dec 2010 14:05:00 -0000 [thread overview]
Message-ID: <bug-46916-4-EdjbW2A1Db@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-46916-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46916
--- Comment #21 from Iain Sandoe <iains at gcc dot gnu.org> 2010-12-14 14:04:58 UTC ---
(In reply to comment #19)
> Hi,
> does the following patch fix the problem?
> darwin_text_section no longer needs to care about hot/cold code since this is
> already done in darwin_function_section.
>
> In fact you might additionally consider putting
> return (DECL_WEAK (decl)
> ? darwin_sections[text_coal_section]
> : text_section);
> into places returning NULL in darwin_function_section, removing case
> SECCAT_TEXT
> from machopic_select_section undefining USE_SELECT_SECTION_FOR_FUNCTIONS
> as suggested by rth as cleanup.
like this?
(fixes the specific problem - but not reg-tested):
Index: gcc/opts.c
===================================================================
--- gcc/opts.c (revision 167793)
+++ gcc/opts.c (working copy)
@@ -723,6 +723,9 @@ finish_options (struct gcc_options *opts, struct g
opts->x_flag_reorder_blocks = 1;
}
+ if (opts->x_flag_reorder_blocks_and_partition)
+ opts->x_flag_reorder_blocks = 1;
+
/* If user requested unwind info, then turn off the partitioning
optimization. */
Index: gcc/config/darwin.c
===================================================================
--- gcc/config/darwin.c (revision 167793)
+++ gcc/config/darwin.c (working copy)
@@ -1145,19 +1145,6 @@ darwin_mark_decl_preserved (const char *name)
}
static section *
-darwin_text_section (int reloc, int weak)
-{
- if (reloc)
- return (weak
- ? darwin_sections[text_unlikely_coal_section]
- : unlikely_text_section ());
- else
- return (weak
- ? darwin_sections[text_coal_section]
- : text_section);
-}
-
-static section *
darwin_rodata_section (int weak, bool zsize)
{
return (weak
@@ -1267,17 +1254,7 @@ machopic_select_section (tree decl,
switch (categorize_decl_for_section (decl, reloc))
{
case SECCAT_TEXT:
- {
- struct cgraph_node *node;
- if (decl && TREE_CODE (decl) == FUNCTION_DECL
- && (node = cgraph_get_node (decl)) != NULL)
- base_section = darwin_function_section (decl,
- node->frequency,
- node->only_called_at_startup,
- node->only_called_at_exit);
- if (!base_section)
- base_section = darwin_text_section (reloc, weak);
- }
+ gcc_unreachable ();
break;
case SECCAT_RODATA:
@@ -2969,7 +2946,10 @@ darwin_function_section (tree decl, enum node_freq
bool startup, bool exit)
{
if (!flag_reorder_functions)
- return NULL;
+ return (DECL_WEAK (decl)
+ ? darwin_sections[text_coal_section]
+ : text_section);
+
/* Startup code should go to startup subsection unless it is
unlikely executed (this happens especially with function splitting
where we can split away unnecesary parts of static constructors. */
@@ -2994,7 +2974,9 @@ darwin_function_section (tree decl, enum node_freq
return get_named_text_section
(decl, "__TEXT,__hot,regular,pure_instructions", "_hot");
default:
- return NULL;
+ return (DECL_WEAK (decl)
+ ? darwin_sections[text_coal_section]
+ : text_section);
}
}
Index: gcc/config/darwin.h
===================================================================
--- gcc/config/darwin.h (revision 167793)
+++ gcc/config/darwin.h (working copy)
@@ -664,7 +664,7 @@ extern GTY(()) section * darwin_sections[NUM_DARWI
#undef TARGET_ASM_SELECT_SECTION
#define TARGET_ASM_SELECT_SECTION machopic_select_section
-#define USE_SELECT_SECTION_FOR_FUNCTIONS
+
#undef TARGET_ASM_FUNCTION_SECTION
#define TARGET_ASM_FUNCTION_SECTION darwin_function_section
next prev parent reply other threads:[~2010-12-14 14:05 UTC|newest]
Thread overview: 104+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-12 23:12 [Bug middle-end/46916] New: gcc.dg/torture/stackalign/non-local-goto-[1,2].c ICEs compiler from profiledbootstrap howarth at nitro dot med.uc.edu
2010-12-12 23:13 ` [Bug middle-end/46916] " howarth at nitro dot med.uc.edu
2010-12-13 7:21 ` dominiq at lps dot ens.fr
2010-12-13 8:00 ` dominiq at lps dot ens.fr
2010-12-13 14:30 ` howarth at nitro dot med.uc.edu
2010-12-13 15:32 ` howarth at nitro dot med.uc.edu
2010-12-13 15:34 ` [Bug middle-end/46916] gcc.dg/torture/stackalign/non-local-goto-[1,2].c ICEs compiler due to r167727 howarth at nitro dot med.uc.edu
2010-12-13 18:22 ` iains at gcc dot gnu.org
2010-12-13 18:33 ` mrs at gcc dot gnu.org
2010-12-13 19:11 ` dominiq at lps dot ens.fr
2010-12-13 20:16 ` iains at gcc dot gnu.org
2010-12-13 22:55 ` mikestump at comcast dot net
2010-12-14 8:54 ` dominiq at lps dot ens.fr
2010-12-14 9:09 ` iains at gcc dot gnu.org
2010-12-14 10:08 ` hubicka at gcc dot gnu.org
2010-12-14 10:10 ` hubicka at gcc dot gnu.org
2010-12-14 10:39 ` iains at gcc dot gnu.org
2010-12-14 10:58 ` Jan Hubicka
2010-12-14 13:18 ` Jan Hubicka
2010-12-14 10:58 ` hubicka at ucw dot cz
2010-12-14 12:17 ` iains at gcc dot gnu.org
2010-12-14 13:18 ` hubicka at ucw dot cz
2010-12-14 14:03 ` dominiq at lps dot ens.fr
2010-12-14 14:05 ` iains at gcc dot gnu.org [this message]
2010-12-14 14:18 ` dominiq at lps dot ens.fr
2010-12-14 14:23 ` iains at gcc dot gnu.org
2010-12-14 14:31 ` howarth at nitro dot med.uc.edu
2010-12-14 14:36 ` howarth at nitro dot med.uc.edu
2010-12-14 14:38 ` howarth at nitro dot med.uc.edu
2010-12-14 16:39 ` iains at gcc dot gnu.org
2010-12-14 16:41 ` iains at gcc dot gnu.org
2010-12-14 16:44 ` dominiq at lps dot ens.fr
2010-12-14 16:46 ` iains at gcc dot gnu.org
2010-12-14 17:10 ` howarth at nitro dot med.uc.edu
2010-12-14 17:17 ` iains at gcc dot gnu.org
2010-12-14 17:32 ` hubicka at ucw dot cz
2010-12-14 19:01 ` dominiq at lps dot ens.fr
2010-12-14 19:54 ` iains at gcc dot gnu.org
2010-12-14 20:06 ` dominiq at lps dot ens.fr
2010-12-14 20:17 ` iains at gcc dot gnu.org
2010-12-14 21:28 ` hubicka at gcc dot gnu.org
2010-12-14 21:32 ` hubicka at gcc dot gnu.org
2010-12-14 21:38 ` iains at gcc dot gnu.org
2010-12-14 22:46 ` hubicka at ucw dot cz
2010-12-14 22:55 ` dominiq at lps dot ens.fr
2010-12-14 23:21 ` howarth at nitro dot med.uc.edu
2010-12-14 23:39 ` iains at gcc dot gnu.org
2010-12-14 23:43 ` iains at gcc dot gnu.org
2010-12-14 23:44 ` iains at gcc dot gnu.org
2010-12-14 23:51 ` dominiq at lps dot ens.fr
2010-12-15 0:06 ` hubicka at gcc dot gnu.org
2010-12-15 0:28 ` iains at gcc dot gnu.org
2010-12-15 1:18 ` howarth at nitro dot med.uc.edu
2010-12-15 1:53 ` hubicka at ucw dot cz
2010-12-15 3:15 ` howarth at nitro dot med.uc.edu
2010-12-15 3:20 ` howarth at nitro dot med.uc.edu
2010-12-15 10:22 ` iains at gcc dot gnu.org
2010-12-15 12:36 ` iains at gcc dot gnu.org
2010-12-15 13:10 ` hubicka at gcc dot gnu.org
2010-12-15 13:25 ` iains at gcc dot gnu.org
2010-12-15 13:33 ` hubicka at ucw dot cz
2010-12-15 13:41 ` iains at gcc dot gnu.org
2010-12-15 13:50 ` hubicka at ucw dot cz
2010-12-15 13:56 ` iains at gcc dot gnu.org
2010-12-15 14:01 ` iains at gcc dot gnu.org
2010-12-15 14:07 ` hubicka at ucw dot cz
2010-12-15 14:34 ` howarth at nitro dot med.uc.edu
2010-12-15 15:16 ` howarth at nitro dot med.uc.edu
2010-12-15 15:17 ` iains at gcc dot gnu.org
2010-12-15 17:12 ` iains at gcc dot gnu.org
2010-12-15 21:29 ` dominiq at lps dot ens.fr
2010-12-15 21:37 ` iains at gcc dot gnu.org
2010-12-15 21:52 ` howarth at nitro dot med.uc.edu
2010-12-15 22:02 ` howarth at nitro dot med.uc.edu
2010-12-15 23:36 ` iains at gcc dot gnu.org
2010-12-15 23:44 ` howarth at nitro dot med.uc.edu
2010-12-16 0:17 ` howarth at nitro dot med.uc.edu
2010-12-16 4:59 ` howarth at nitro dot med.uc.edu
2010-12-16 5:01 ` howarth at nitro dot med.uc.edu
2010-12-16 5:33 ` howarth at nitro dot med.uc.edu
2010-12-16 6:26 ` howarth at nitro dot med.uc.edu
2010-12-16 16:12 ` howarth at nitro dot med.uc.edu
2010-12-16 16:26 ` iains at gcc dot gnu.org
2010-12-16 17:08 ` howarth at nitro dot med.uc.edu
2010-12-16 17:34 ` dominiq at lps dot ens.fr
2010-12-16 17:41 ` iains at gcc dot gnu.org
2010-12-16 18:05 ` dominiq at lps dot ens.fr
2010-12-16 20:34 ` iains at gcc dot gnu.org
2010-12-16 20:41 ` howarth at nitro dot med.uc.edu
2010-12-16 20:52 ` iains at gcc dot gnu.org
2010-12-17 13:50 ` howarth at nitro dot med.uc.edu
2010-12-17 14:08 ` dominiq at lps dot ens.fr
2010-12-17 14:21 ` iains at gcc dot gnu.org
2010-12-17 14:31 ` dominiq at lps dot ens.fr
2010-12-17 14:47 ` howarth at nitro dot med.uc.edu
2010-12-17 15:00 ` howarth at nitro dot med.uc.edu
2010-12-17 15:04 ` iains at gcc dot gnu.org
2010-12-17 22:08 ` dominiq at lps dot ens.fr
2010-12-17 23:56 ` iains at gcc dot gnu.org
2010-12-20 9:05 ` dominiq at lps dot ens.fr
2010-12-20 10:02 ` iains at gcc dot gnu.org
2010-12-20 10:15 ` iains at gcc dot gnu.org
2010-12-20 11:29 ` iains at gcc dot gnu.org
2011-01-09 16:08 ` howarth at nitro dot med.uc.edu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-46916-4-EdjbW2A1Db@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).