[Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994

2010-12-15 Thread ro at gcc dot gnu.org
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


[Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994

2010-12-12 Thread hubicka at gcc dot gnu.org
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?


[Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994

2010-12-08 Thread jakub at gcc dot gnu.org
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.


[Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994

2010-12-08 Thread ro at gcc dot gnu.org
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.


[Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994

2010-12-08 Thread jakub at gcc dot gnu.org
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   |


[Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994

2010-12-07 Thread danglin at gcc dot gnu.org
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=gccview=revrev=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


[Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994

2010-12-06 Thread jakub at gcc dot gnu.org
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.


[Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994

2010-12-06 Thread davek at gcc dot gnu.org
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.)


[Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994

2010-12-03 Thread ro at CeBiTec dot Uni-Bielefeld.DE
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


[Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994

2010-12-03 Thread dave at hiauly1 dot hia.nrc.ca
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


[Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994

2010-12-03 Thread davek at gcc dot gnu.org
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:

.filedebug9.C
.text
.def_s;.scl10;.type010;.size1;.endef
.def.eos;.val1;.scl102;.tag_s;.size1;  
 .endef
.def_s;.scl13;.tag_s;.size1;.type010;  
 .endef
.def___main;.scl2;.type32;.endef
.section.text.startup,x
.p2align 4,,15
.text
.def_main;.val_main;.scl2;.type044;.endef
.globl_main
_main:
.def.bf;.val.;.scl101;.line23;.endef
.section.text.startup,x
LFB1:
.cfi_startproc
.cfi_personality 0,___gxx_personality_v0
.cfi_lsda 0,LLSDA1
leal4(%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
.ln1
call___main
.def.bb;.val.;.scl100;.line1;.endef
.def.bb;.val.;.scl100;.line1;.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;.scl1;.tag_s;.size1;   
.type010;.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?


[Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994

2010-12-01 Thread danglin at gcc dot gnu.org
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.


[Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994

2010-11-29 Thread ro at gcc dot gnu.org
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.


[Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994

2010-11-26 Thread rguenth at gcc dot gnu.org
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


[Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994

2010-11-26 Thread danglin at gcc dot gnu.org
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.


[Bug middle-end/46671] [4.6 Regression] ICE in default_no_named_section, at varasm .c:5994

2010-11-26 Thread danglin at gcc dot gnu.org
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