public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
@ 2010-11-26  7:32 danglin at gcc dot gnu.org
  2010-11-26 10:33 ` [Bug middle-end/46671] " rguenth at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: danglin at gcc dot gnu.org @ 2010-11-26  7:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

           Summary: [4.6 Regression] ICE in default_no_named_section, at
                    varasm .c:5994
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: danglin@gcc.gnu.org
              Host: hppa2.0w-hp-hpux11.11
            Target: hppa2.0w-hp-hpux11.11
             Build: hppa2.0w-hp-hpux11.11


configure:3233: /test/gnu/gcc/objdir/./gcc/xgcc -B/test/gnu/gcc/objdir/./gcc/
-B
/opt/gnu/gcc/gcc-4.6/hppa2.0w-hp-hpux11.11/bin/
-B/opt/gnu/gcc/gcc-4.6/hppa2.0w-
hp-hpux11.11/lib/ -isystem /opt/gnu/gcc/gcc-4.6/hppa2.0w-hp-hpux11.11/include
-i
system /opt/gnu/gcc/gcc-4.6/hppa2.0w-hp-hpux11.11/sys-include    -c -g -O2 
conf
test.c >&5
conftest.c: In function 'main':
conftest.c:16:1: internal compiler error: in default_no_named_section, at
varasm
.c:5994
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
configure:3237: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3251: error: in `/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libgcc':
configure:3254: error: cannot compute suffix of object files: cannot compile

Odds are this was caused by:

2010-11-23  Jan Hubicka  <jh@suse.cz>

        * tree.h (DECL_HAS_IMPLICIT_SECTION_NAME_P): New macro.
        (tree_decl_with_vis): Add implicit_section_name_p.
        * targhooks.h (default_function_section): Declare.
        * target.def (function_section): New hook.
        * defaults.h (HOT_TEXT_SECTION_NAME,
        UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Remove.
        * predict.c (choose_function_section): Remove.
        (estimate_bb_frequencies): Do not use choose_function_section.
        * coretypes.h (enum node_frequency): Move here from cgraph.h
        * cgraph.h (enum node_frequency): Remove.
        * varasm.c (initialize_cold_section_name, unlikely_text_section,
        unlikely_text_section_p): Remove.
        (named_subsection_entry): New structure.
        (get_text_section): New function.
        (default_function_section): New function.
        (function_section_1): Break out from ...; handle profile info.
        (function_section): ... here.
        (unlikely_text_section): Remove.
        (unlikely_text_section_p): Use function_section_1.
        (assemble_start_function): Do not initialize cold section.
        (default_section_type_flags): Do not special case cold subsection.
        (switch_to_section): Likewise.
        * output.h (get_text_section): Define.
        * config/i386/winnt.c: Do not special case cold section.
        * config/darwin-protos.h (darwin_function_section): Declare.
        * config/microblaze/microblaze.h (HOT_TEXT_SECTION_NAME,
        UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Remove.
        * config/ia64/hpux.h (HOT_TEXT_SECTION_NAME,
        UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Remove.
        (TARGET_ASM_FUNCTION_SECTION): Define to ia64_hpux_function_section.
        * config/ia64/ia64.c (ia64_hpux_function_section): New function.
        * config/darwin.c (machopic_select_section): Use
        darwin_function_section.
        (darwin_function_section): New function.
        * config/darwin.h (HOT_TEXT_SECTION_NAME,
        UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Remove.
        (TARGET_ASM_FUNCTION_SECTION): Define.
        * system.h (HOT_TEXT_SECTION_NAME,
        UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Poison.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
  2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
@ 2010-11-26 10:33 ` rguenth at gcc dot gnu.org
  2010-11-27  5:36 ` danglin at gcc dot gnu.org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-26 10:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org
   Target Milestone|---                         |4.6.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
  2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
  2010-11-26 10:33 ` [Bug middle-end/46671] " rguenth at gcc dot gnu.org
@ 2010-11-27  5:36 ` danglin at gcc dot gnu.org
  2010-11-27  5:51 ` danglin at gcc dot gnu.org
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: danglin at gcc dot gnu.org @ 2010-11-27  5:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

--- Comment #1 from John David Anglin <danglin at gcc dot gnu.org> 2010-11-27 02:07:08 UTC ---
Backtrace:

Breakpoint 1, default_no_named_section (name=0x7afad8f0 ".text.startup",
flags=2097408, decl=0x7afa6900) at ../../gcc/gcc/varasm.c:5994
5994      gcc_unreachable ();
(gdb) bt
#0  default_no_named_section (name=0x7afad8f0 ".text.startup", flags=2097408,
decl=0x7afa6900) at ../../gcc/gcc/varasm.c:5994
#1  0x013c6334 in switch_to_section (new_section=0x7afad8e0) at
../../gcc/gcc/varasm.c:6863
#2  0x013ace1c in assemble_start_function (decl=0x7afa6900, fnname=0x7af53da0
"@main") at ../../gcc/gcc/varasm.c:1591
#3  0x01a583b0 in rest_of_handle_final () at ../../gcc/gcc/final.c:4227
#4  0x00d364e0 in execute_one_pass (pass=0x400219ac) at
../../gcc/gcc/passes.c:1564
#5  0x00d367d8 in execute_pass_list (pass=0x400219ac) at
../../gcc/gcc/passes.c:1619
#6  0x00d367fc in execute_pass_list (pass=0x400197a4) at
../../gcc/gcc/passes.c:1620
#7  0x00d367fc in execute_pass_list (pass=0x40019770) at
../../gcc/gcc/passes.c:1620
#8  0x025a4564 in tree_rest_of_compilation (fndecl=0x7afa6900) at
../../gcc/gcc/tree-optimize.c:422
#9  0x01492700 in cgraph_expand_function (node=0x7afb5000) at
../../gcc/gcc/cgraphunit.c:1508
#10 0x01492994 in cgraph_expand_all_functions () at
../../gcc/gcc/cgraphunit.c:1567
#11 0x014933c4 in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1823
#12 0x014906ac in cgraph_finalize_compilation_unit () at
../../gcc/gcc/cgraphunit.c:1031
#13 0x000c6300 in c_write_global_declarations () at ../../gcc/gcc/c-decl.c:9837
#14 0x00ec1c38 in compile_file () at ../../gcc/gcc/toplev.c:819
#15 0x00ec5b28 in do_compile () at ../../gcc/gcc/toplev.c:2207
#16 0x00ec5dd0 in toplev_main (argc=17, argv=0x7eff055c) at
../../gcc/gcc/toplev.c:2270
#17 0x003866d4 in main (argc=17, argv=0x7eff055c) at ../../gcc/gcc/main.c:36

ICE doesn't occur at -O0.  Occurs at -O1 and above.  

I'm going to try removing assert.

It should be noted that on 32-bit HP-UX we create multiple unamed "sections"
(subspaces) in an object.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
  2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
  2010-11-26 10:33 ` [Bug middle-end/46671] " rguenth at gcc dot gnu.org
  2010-11-27  5:36 ` danglin at gcc dot gnu.org
@ 2010-11-27  5:51 ` danglin at gcc dot gnu.org
  2010-11-29 13:36 ` ro at gcc dot gnu.org
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: danglin at gcc dot gnu.org @ 2010-11-27  5:51 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

--- Comment #2 from John David Anglin <danglin at gcc dot gnu.org> 2010-11-27 04:20:08 UTC ---
> I'm going to try removing assert.
> 
> It should be noted that on 32-bit HP-UX we create multiple unamed "sections"
> (subspaces) in an object.

Doesn't work.  Section handling is seriously broken:

libtool: link: /test/gnu/gcc/objdir/./gcc/xgcc -B/test/gnu/gcc/objdir/./gcc/
-B/
opt/gnu/gcc/gcc-4.6/hppa2.0w-hp-hpux11.11/bin/
-B/opt/gnu/gcc/gcc-4.6/hppa2.0w-h
p-hpux11.11/lib/ -isystem /opt/gnu/gcc/gcc-4.6/hppa2.0w-hp-hpux11.11/include
-is
ystem /opt/gnu/gcc/gcc-4.6/hppa2.0w-hp-hpux11.11/sys-include    -shared -fPIC
-W
l,+h -Wl,libgomp.sl.1 -Wl,+b -Wl,/opt/gnu/gcc/gcc-4.6/lib -o
.libs/libgomp.sl.1.
0  .libs/alloc.o .libs/barrier.o .libs/critical.o .libs/env.o .libs/error.o
.lib
s/iter.o .libs/iter_ull.o .libs/loop.o .libs/loop_ull.o .libs/ordered.o
.libs/pa
rallel.o .libs/sections.o .libs/single.o .libs/task.o .libs/team.o .libs/work.o 
.libs/lock.o .libs/mutex.o .libs/proc.o .libs/sem.o .libs/bar.o .libs/ptrlock.o 
.libs/time.o .libs/fortran.o .libs/affinity.o   -lrt -lc  -pthread  
/usr/ccs/bin/ld: Internal Error 4012 (invalid subspace in symbol_value)
collect2: ld returned 1 exit status


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
  2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2010-11-27  5:51 ` danglin at gcc dot gnu.org
@ 2010-11-29 13:36 ` ro at gcc dot gnu.org
  2010-12-02  3:20 ` danglin at gcc dot gnu.org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ro at gcc dot gnu.org @ 2010-11-29 13:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|hppa2.0w-hp-hpux11.11       |hppa2.0w-hp-hpux11.11,
                   |                            |alpha-dec-osf5.1b
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.11.29 12:20:47
                 CC|                            |ro at gcc dot gnu.org
               Host|hppa2.0w-hp-hpux11.11       |hppa2.0w-hp-hpux11.11,
                   |                            |alpha-dec-osf5.1b
     Ever Confirmed|0                           |1
              Build|hppa2.0w-hp-hpux11.11       |hppa2.0w-hp-hpux11.11,
                   |                            |alpha-dec-osf5.1b

--- Comment #3 from Rainer Orth <ro at gcc dot gnu.org> 2010-11-29 12:20:47 UTC ---
Tru64 UNIX V5.1B is equally affected.  Please fix.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
  2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2010-11-29 13:36 ` ro at gcc dot gnu.org
@ 2010-12-02  3:20 ` danglin at gcc dot gnu.org
  2010-12-03 15:22 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: danglin at gcc dot gnu.org @ 2010-12-02  3:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

--- Comment #4 from John David Anglin <danglin at gcc dot gnu.org> 2010-12-02 03:19:59 UTC ---
default_function_section is being called on systems without named sections.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
  2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2010-12-02  3:20 ` danglin at gcc dot gnu.org
@ 2010-12-03 15:22 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2010-12-03 17:22 ` dave at hiauly1 dot hia.nrc.ca
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2010-12-03 15:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

--- Comment #5 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2010-12-03 15:21:51 UTC ---
Jan, your patch has broken bootstrap on two platforms for a week now,
and there's not even an indication that you're looking at the problem.
Please fix or revert ASAP.

    Rainer


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
  2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2010-12-03 15:22 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2010-12-03 17:22 ` dave at hiauly1 dot hia.nrc.ca
  2010-12-04  5:37 ` davek at gcc dot gnu.org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: dave at hiauly1 dot hia.nrc.ca @ 2010-12-03 17:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

--- Comment #6 from dave at hiauly1 dot hia.nrc.ca 2010-12-03 17:22:07 UTC ---
On Fri, 03 Dec 2010, ro at CeBiTec dot Uni-Bielefeld.DE wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671
> 
> --- Comment #5 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2010-12-03 15:21:51 UTC ---
> Jan, your patch has broken bootstrap on two platforms for a week now,
> and there's not even an indication that you're looking at the problem.
> Please fix or revert ASAP.

The implementation of default_function_section in the change is elf
specific.  As a result, all targets that don't use elf sections are broken
by the change.  Even if I define TARGET_ASM_FUNCTION_SECTION, this
will still leave the other targets that don't use elf sections broken.
Elf sections were never the default before.

The change was applied during stage3 and it wasn't a bug fix.  So, the
commit was questionable.

Dave


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
  2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2010-12-03 17:22 ` dave at hiauly1 dot hia.nrc.ca
@ 2010-12-04  5:37 ` davek at gcc dot gnu.org
  2010-12-06 12:47 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: davek at gcc dot gnu.org @ 2010-12-04  5:37 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

Dave Korn <davek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |davek at gcc dot gnu.org

--- Comment #7 from Dave Korn <davek at gcc dot gnu.org> 2010-12-04 05:36:36 UTC ---
  I think this may also have caused

FAIL: g++.dg/debug/debug9.C (test for excess errors)

on i686-pc-cygwin.  I get all sorts of assembler complaints:

/gnu/gcc/obj-pr40125/gcc/testsuite/g++/../../g++
-B/gnu/gcc/obj-pr40125/gcc/testsuite/g++/../../ -nostdinc++
-I/gnu/gcc/obj-pr40125/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin
-I/gnu/gcc/obj-pr40125/i686-pc-cygwin/libstdc++-v3/include
-I/gnu/gcc/gcc-patched/libstdc++-v3/libsupc++
-I/gnu/gcc/gcc-patched/libstdc++-v3/include/backward
-I/gnu/gcc/gcc-patched/libstdc++-v3/testsuite/util -fmessage-length=0 -gcoff3
-O2 -c -o debug9.o /gnu/gcc/gcc-patched/gcc/testsuite/g++.dg/debug/debug9.C 
/win/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccaVQnkC.s: Assembler messages:
/win/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccaVQnkC.s:61: Error: CFI instruction
used without previous .cfi_startproc
/win/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccaVQnkC.s:62: Error: CFI instruction
used without previous .cfi_startproc
/win/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccaVQnkC.s:63: Error: CFI instruction
used without previous .cfi_startproc
/win/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccaVQnkC.s:65: Error: CFI instruction
used without previous .cfi_startproc
/win/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccaVQnkC.s:67: Error: CFI instruction
used without previous .cfi_startproc
/win/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccaVQnkC.s:69: Error: CFI instruction
used without previous .cfi_startproc
/win/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccaVQnkC.s:71: Error: CFI instruction
used without previous .cfi_startproc
/win/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccaVQnkC.s:75: Error: CFI instruction
used without previous .cfi_startproc
/win/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccaVQnkC.s:135: Error: .cfi_endproc
without corresponding .cfi_startproc
/win/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccaVQnkC.s:178: Error: open CFI at the
end of file; missing .cfi_endproc directive
compiler exited with status 1

... and these are caused because we're hopping around between .text and
.text.startup, and we do so:

    .file    "debug9.C"
    .text
    .def    _s;    .scl    10;    .type    010;    .size    1;    .endef
    .def    .eos;    .val    1;    .scl    102;    .tag    _s;    .size    1;  
 .endef
    .def    _s;    .scl    13;    .tag    _s;    .size    1;    .type    010;  
 .endef
    .def    ___main;    .scl    2;    .type    32;    .endef
    .section    .text.startup,"x"
    .p2align 4,,15
    .text
    .def    _main;    .val    _main;    .scl    2;    .type    044;    .endef
    .globl    _main
_main:
    .def    .bf;    .val    .;    .scl    101;    .line    23;    .endef
    .section    .text.startup,"x"
LFB1:
    .cfi_startproc
    .cfi_personality 0,___gxx_personality_v0
    .cfi_lsda 0,LLSDA1
    leal    4(%esp), %ecx
    .cfi_def_cfa 1, 0
    andl    $-16, %esp
    pushl    -4(%ecx)
    pushl    %ebp
    movl    %esp, %ebp
    .cfi_escape 0x10,0x5,0x2,0x75,0
    pushl    %esi
    pushl    %ebx
    pushl    %ecx
    .cfi_escape 0xf,0x3,0x75,0x74,0x6
    .cfi_escape 0x10,0x3,0x2,0x75,0x78
    .cfi_escape 0x10,0x6,0x2,0x75,0x7c
    subl    $44, %esp
    .ln    1
    call    ___main
    .def    .bb;    .val    .;    .scl    100;    .line    1;    .endef
    .def    .bb;    .val    .;    .scl    100;    .line    1;    .endef
    .text

... here, right in the middle of an open CFI.  GAS can't handle this even if we
were to switch back to the original section anyway, but in this case it's even
worse:

    .def    _c;    .val    -26;    .scl    1;    .tag    _s;    .size    1;   
.type    010;    .endef
    leal    -26(%ebp), %ebx
    leal    -25(%ebp), %esi

... as we end up carrying on code generation in a different section.  Urk!

  This test is compiled with -gcoff in effect, and the problematic switch back
to the .text section is generated in sdbout.c#sdbout_one_type(), right here at
the start:

static void
sdbout_one_type (tree type)
{
  if (current_function_decl != NULL_TREE
      && DECL_SECTION_NAME (current_function_decl) != NULL_TREE)
    ; /* Don't change section amid function.  */
  else
    switch_to_section (text_section);

  For some reason this doesn't realise that we may be in a section other than
the .text section any more.  current_function_decl points to main() at the time
of the problem, but DECL_SECTION_NAME is indeed null.

  Honza, any ideas how to teach it about the new sections?


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
  2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2010-12-04  5:37 ` davek at gcc dot gnu.org
@ 2010-12-06 12:47 ` jakub at gcc dot gnu.org
  2010-12-06 17:27 ` davek at gcc dot gnu.org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-06 12:47 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-06 12:47:25 UTC ---
sdbout.c is broken then.  If it doesn't care in which code section it emits the
stuff, it should at least not switch_to_section (text_section) if
in_section != NULL && (in_section->flags & SECTION_CODE) != 0.
And in any case, it should remember in_section from the beginning of the
function into say saved_section automatic var and if it was non-NULL, do
switch_to_section (saved_section) at the end of the function.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
  2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2010-12-06 12:47 ` jakub at gcc dot gnu.org
@ 2010-12-06 17:27 ` davek at gcc dot gnu.org
  2010-12-08  1:27 ` danglin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: davek at gcc dot gnu.org @ 2010-12-06 17:27 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

--- Comment #9 from Dave Korn <davek at gcc dot gnu.org> 2010-12-06 17:27:06 UTC ---
(In reply to comment #8)
> sdbout.c is broken then.

  Quite likely, but I don't understand what it thinks it's trying to do yet
well enough to be sure how.

>  If it doesn't care in which code section it emits the
> stuff, it should at least not switch_to_section (text_section) if
> in_section != NULL && (in_section->flags & SECTION_CODE) != 0.

  I'll take a look at that possibility, thanks.  I'm going to have to read up
on the coff debug spec to see what it says about the matter.

> And in any case, it should remember in_section from the beginning of the
> function into say saved_section automatic var and if it was non-NULL, do
> switch_to_section (saved_section) at the end of the function.

  In fact I don't think that would help, GAS does not accept switching section
in the middle of an open CFI directive block (though this is probably an
implementation limitation rather than a deliberate design choice; cfi is
tracked on a per-frag basis, switching to a new section and back leads to
starting a new frag which doesn't have any pointer to the previously-begun cfi
block.)


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
  2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2010-12-06 17:27 ` davek at gcc dot gnu.org
@ 2010-12-08  1:27 ` danglin at gcc dot gnu.org
  2010-12-08 12:29 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: danglin at gcc dot gnu.org @ 2010-12-08  1:27 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

--- Comment #10 from John David Anglin <danglin at gcc dot gnu.org> 2010-12-08 01:26:47 UTC ---
Author: danglin
Date: Wed Dec  8 01:26:44 2010
New Revision: 167581

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167581
Log:
    PR middle-end/46671
    PR target/46685
    * config/pa/pa.c (pa_function_section): New function.
    (TARGET_ASM_FUNCTION_SECTION): Define.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/pa/pa.c


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
  2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2010-12-08  1:27 ` danglin at gcc dot gnu.org
@ 2010-12-08 12:29 ` jakub at gcc dot gnu.org
  2010-12-08 13:29 ` ro at gcc dot gnu.org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-08 12:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-08 12:29:19 UTC ---
Assuming this is fixed now.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
  2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2010-12-08 12:29 ` jakub at gcc dot gnu.org
@ 2010-12-08 13:29 ` ro at gcc dot gnu.org
  2010-12-08 16:49 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ro at gcc dot gnu.org @ 2010-12-08 13:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #12 from Rainer Orth <ro at gcc dot gnu.org> 2010-12-08 13:28:47 UTC ---
No, it's not: Tru64 UNIX is still broken.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
  2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2010-12-08 13:29 ` ro at gcc dot gnu.org
@ 2010-12-08 16:49 ` jakub at gcc dot gnu.org
  2010-12-12 20:38 ` hubicka at gcc dot gnu.org
  2010-12-15 10:25 ` ro at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-08 16:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|hppa2.0w-hp-hpux11.11,      |alpha-dec-osf5.1b
                   |alpha-dec-osf5.1b           |
           Priority|P3                          |P4
               Host|hppa2.0w-hp-hpux11.11,      |alpha-dec-osf5.1b
                   |alpha-dec-osf5.1b           |
              Build|hppa2.0w-hp-hpux11.11,      |alpha-dec-osf5.1b
                   |alpha-dec-osf5.1b           |


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
  2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2010-12-08 16:49 ` jakub at gcc dot gnu.org
@ 2010-12-12 20:38 ` hubicka at gcc dot gnu.org
  2010-12-15 10:25 ` ro at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: hubicka at gcc dot gnu.org @ 2010-12-12 20:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |WAITING

--- Comment #13 from Jan Hubicka <hubicka at gcc dot gnu.org> 2010-12-12 20:38:21 UTC ---
I commited the fix, could you confirm if the bug is gone now?


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994
  2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2010-12-12 20:38 ` hubicka at gcc dot gnu.org
@ 2010-12-15 10:25 ` ro at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: ro at gcc dot gnu.org @ 2010-12-15 10:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46671

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED

--- Comment #14 from Rainer Orth <ro at gcc dot gnu.org> 2010-12-15 10:24:43 UTC ---
I've just finished a full Tru64 UNIX V5.1B bootstrap with only a few unrelated
regressions, so we're fine now.

Thanks.
  Rainer


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-12-15 10:25 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-26  7:32 [Bug middle-end/46671] New: [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994 danglin at gcc dot gnu.org
2010-11-26 10:33 ` [Bug middle-end/46671] " rguenth at gcc dot gnu.org
2010-11-27  5:36 ` danglin at gcc dot gnu.org
2010-11-27  5:51 ` danglin at gcc dot gnu.org
2010-11-29 13:36 ` ro at gcc dot gnu.org
2010-12-02  3:20 ` danglin at gcc dot gnu.org
2010-12-03 15:22 ` ro at CeBiTec dot Uni-Bielefeld.DE
2010-12-03 17:22 ` dave at hiauly1 dot hia.nrc.ca
2010-12-04  5:37 ` davek at gcc dot gnu.org
2010-12-06 12:47 ` jakub at gcc dot gnu.org
2010-12-06 17:27 ` davek at gcc dot gnu.org
2010-12-08  1:27 ` danglin at gcc dot gnu.org
2010-12-08 12:29 ` jakub at gcc dot gnu.org
2010-12-08 13:29 ` ro at gcc dot gnu.org
2010-12-08 16:49 ` jakub at gcc dot gnu.org
2010-12-12 20:38 ` hubicka at gcc dot gnu.org
2010-12-15 10:25 ` ro at gcc dot gnu.org

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).