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: Wed, 15 Dec 2010 12:36:00 -0000 [thread overview] Message-ID: <bug-46916-4-kDmtTV6Onc@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 #55 from Iain Sandoe <iains at gcc dot gnu.org> 2010-12-15 12:36:00 UTC --- this solves FAIL: g++.dg/other/pr22003.C (test for excess errors) but we have total failure with "-O3 -g" for gcc. [all fails are warning: no debug symbols in executable (-arch xxxx)] (looking into that next) ----- your patch + replacing the Darwin bits with this. Index: gcc/config/darwin.c =================================================================== --- gcc/config/darwin.c (revision 167849) +++ 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: @@ -2559,17 +2536,6 @@ darwin_override_options (void) if (!global_options_set.x_dwarf_strict) dwarf_strict = 1; - /* Disable -freorder-blocks-and-partition for darwin_emit_unwind_label. */ - if (flag_reorder_blocks_and_partition - && (targetm.asm_out.emit_unwind_label == darwin_emit_unwind_label)) - { - inform (input_location, - "-freorder-blocks-and-partition does not work with exceptions " - "on this architecture"); - flag_reorder_blocks_and_partition = 0; - flag_reorder_blocks = 1; - } - if (flag_mkernel || flag_apple_kext) { /* -mkernel implies -fapple-kext for C++ */ @@ -2969,32 +2935,42 @@ 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. */ if (startup && freq != NODE_FREQUENCY_UNLIKELY_EXECUTED) - return get_named_text_section - (decl, "__TEXT,__startup,regular,pure_instructions", "_startup"); + return (DECL_WEAK (decl)) + ? darwin_sections[text_startup_coal_section] + : darwin_sections[text_startup_section]; /* Similarly for exit. */ if (exit && freq != NODE_FREQUENCY_UNLIKELY_EXECUTED) - return get_named_text_section (decl, - "__TEXT,__exit,regular,pure_instructions", - "_exit"); + return (DECL_WEAK (decl)) + ? darwin_sections[text_exit_coal_section] + : darwin_sections[text_exit_section]; /* Group cold functions together, similarly for hot code. */ switch (freq) { case NODE_FREQUENCY_UNLIKELY_EXECUTED: - return get_named_text_section - (decl, - "__TEXT,__unlikely,regular,pure_instructions", "_unlikely"); + return (DECL_WEAK (decl)) + ? darwin_sections[text_cold_coal_section] + : darwin_sections[text_cold_section]; + break; case NODE_FREQUENCY_HOT: - return get_named_text_section - (decl, "__TEXT,__hot,regular,pure_instructions", "_hot"); + return (DECL_WEAK (decl)) + ? darwin_sections[text_hot_coal_section] + : darwin_sections[text_hot_section]; + break; default: - return NULL; + return (DECL_WEAK (decl)) + ? darwin_sections[text_coal_section] + : text_section; + break; } } Index: gcc/config/darwin-sections.def =================================================================== --- gcc/config/darwin-sections.def (revision 167849) +++ gcc/config/darwin-sections.def (working copy) @@ -34,6 +34,24 @@ DEF_SECTION (text_unlikely_coal_section, SECTION_C ".section __TEXT,__text_unlikely_coal," "coalesced,pure_instructions", 0) +DEF_SECTION (text_hot_section, SECTION_CODE, + ".section __TEXT,__text_hot,regular,pure_instructions", 0) +DEF_SECTION (text_cold_section, SECTION_CODE, + ".section __TEXT,__text_cold,regular,pure_instructions", 0) +DEF_SECTION (text_startup_section, SECTION_CODE, + ".section __TEXT,__text_startup,regular,pure_instructions", 0) +DEF_SECTION (text_exit_section, SECTION_CODE, + ".section __TEXT,__text_exit,regular,pure_instructions", 0) + +DEF_SECTION (text_hot_coal_section, SECTION_CODE, + ".section __TEXT,__text_hot_coal,coalesced,pure_instructions", 0) +DEF_SECTION (text_cold_coal_section, SECTION_CODE, + ".section __TEXT,__text_cold_coal,coalesced,pure_instructions", 0) +DEF_SECTION (text_startup_coal_section, SECTION_CODE, + ".section __TEXT,__text_stt_coal,coalesced,pure_instructions", 0) +DEF_SECTION (text_exit_coal_section, SECTION_CODE, + ".section __TEXT,__text_exit_coal,coalesced,pure_instructions", 0) + /* const */ DEF_SECTION (const_section, 0, ".const", 0) DEF_SECTION (const_coal_section, SECTION_NO_ANCHOR, Index: gcc/config/darwin.h =================================================================== --- gcc/config/darwin.h (revision 167849) +++ 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-15 12:36 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 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 [this message] 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-kDmtTV6Onc@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: linkBe 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).