Bug 18170

Summary: [4.0/4.1 Regression] m32r-elf-as, m32r-linux-as debug relocation error for c++
Product: gcc Reporter: inaoka.kazuhiro
Component: targetAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED WONTFIX    
Severity: minor CC: gcc-bugs, hp
Priority: P3 Keywords: wrong-code, wrong-debug
Version: 4.0.0   
Target Milestone: 4.1.0   
Host: m32r Target: m32r
Build: Known to work:
Known to fail: Last reconfirmed: 2005-06-12 15:05:57

Description inaoka.kazuhiro 2004-10-27 04:34:56 UTC
When I build m32r-elf-g++ version 4.0.0, an assemble debug relocation error 
happened.

/home3/FSF/org_src/gcc/build/gcc/xgcc -shared-libgcc -
B/home3/FSF/org_src/gcc/build/gcc/ -nostdinc++ -
L/home3/FSF/org_src/gcc/build/m32r-elf/libstdc++-v3/src -
L/home3/FSF/org_src/gcc/build/m32r-elf/libstdc++-v3/src/.libs -
B/usr/local/m32r-elf/m32r-elf/bin/ -B/usr/local/m32r-elf/m32r-elf/lib/ -
isystem /usr/local/m32r-elf/m32r-elf/include -isystem /usr/local/m32r-elf/m32r-
elf/sys-include -I/home3/FSF/org_src/gcc/build/m32r-elf/libstdc++-
v3/include/m32r-elf -I/home3/FSF/org_src/gcc/build/m32r-elf/libstdc++-
v3/include -I/home3/FSF/org_src/gcc/gcc/libstdc++-v3/libsupc++ -g -Os -g -Os -
fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-
show-location=once -c /home3/FSF/org_src/gcc/gcc/libstdc++-v3/src/fstream-
inst.cc -o fstream-inst.o
/tmp/ccpeTFIw.s: Assembler messages:
/tmp/ccpeTFIw.s:5842: Error: can't resolve 
`.gnu.linkonce.t._ZNSt13basic_fstreamIcSt11char_traitsIcEED0Ev' 
{.gnu.linkonce.t._ZNSt13basic_fstreamIcSt11char_traitsIcEED0Ev section} - 
`_ZNSt13basic_fstreamIcSt11char_traitsIcEED0Ev' 
{.gnu.linkonce.t._ZNSt13basic_fstreamIcSt11char_traitsIcEED0Ev section}
/tmp/ccpeTFIw.s:5842: Error: expression too complex
/tmp/ccpeTFIw.s:6015: Error: can't resolve 
`.gnu.linkonce.t._ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev' 
{.gnu.linkonce.t._ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev section} - 
`_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev' 
{.gnu.linkonce.t._ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev section}
/tmp/ccpeTFIw.s:6015: Error: expression too complex
/tmp/ccpeTFIw.s:6553: Error: can't resolve 
`.gnu.linkonce.t._ZNSt14basic_ofstreamIcSt11char_traitsIcEED0Ev' 
{.gnu.linkonce.t._ZNSt14basic_ofstreamIcSt11char_traitsIcEED0Ev section} - 
`_ZNSt14basic_ofstreamIcSt11char_traitsIcEED0Ev' 
{.gnu.linkonce.t._ZNSt14basic_ofstreamIcSt11char_traitsIcEED0Ev section}
/tmp/ccpeTFIw.s:6553: Error: expression too complex
/tmp/ccpeTFIw.s:6698: Error: can't resolve 
`.gnu.linkonce.t._ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev' 
{.gnu.linkonce.t._ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev section} - 
`_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev' 
{.gnu.linkonce.t._ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev section}
/tmp/ccpeTFIw.s:6698: Error: expression too complex
/tmp/ccpeTFIw.s:7218: Error: can't resolve 
`.gnu.linkonce.t._ZNSt14basic_ifstreamIcSt11char_traitsIcEED0Ev' 
{.gnu.linkonce.t._ZNSt14basic_ifstreamIcSt11char_traitsIcEED0Ev section} - 
`_ZNSt14basic_ifstreamIcSt11char_traitsIcEED0Ev' 
{.gnu.linkonce.t._ZNSt14basic_ifstreamIcSt11char_traitsIcEED0Ev section}
/tmp/ccpeTFIw.s:7218: Error: expression too complex
/tmp/ccpeTFIw.s:7363: Error: can't resolve 
`.gnu.linkonce.t._ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev' 
{.gnu.linkonce.t._ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev section} - 
`_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev' 
{.gnu.linkonce.t._ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev section}
/tmp/ccpeTFIw.s:7363: Error: expression too complex
make[3]: *** [fstream-inst.lo] Error 1
Comment 1 Andrew Pinski 2004-10-27 11:54:55 UTC
What version of binutils are you using?
Comment 2 inaoka.kazuhiro 2004-10-27 12:05:19 UTC
(In reply to comment #1)
> What version of binutils are you using?
GNU assembler version 2.15.94 (m32r-elf) using BFD version 2.15.94 20041022
Comment 3 Andrew Pinski 2004-11-07 15:39:23 UTC
*** Bug 18355 has been marked as a duplicate of this bug. ***
Comment 4 Andrew Pinski 2004-11-07 15:54:31 UTC
Confirmed via the dup bug.  These seems like they are caused by comdat support.
Comment 5 CVS Commits 2004-12-02 19:39:22 UTC
Subject: Bug 18170

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tobi@gcc.gnu.org	2004-12-02 19:39:15

Modified files:
	libgfortran    : ChangeLog 
	libgfortran/io : transfer.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.dg: direct_io_3.f90 

Log message:
	libgfortran/
	PR fortran/18710
	* io/transfer.c (unformatted_read, unformatted_write): width of
	a COMPLEX is twice its kind.
	
	gcc/testsuite/
	PR fortran/18170
	* gfortran.dg/direct_io_3.f90: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.124&r2=1.125
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/transfer.c.diff?cvsroot=gcc&r1=1.17&r2=1.18
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4708&r2=1.4709
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/direct_io_3.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 6 Tobias Schl├╝ter 2004-12-02 20:15:37 UTC
That commit is unrelated to this bug, I had mistyped the PR number.

Sorry.
Comment 7 Andrew Pinski 2004-12-13 18:17:05 UTC
Does this work now or is still broken?
Also could you attach a preprocessed source and the failing assembly?
Comment 8 Hans-Peter Nilsson 2004-12-13 22:12:58 UTC
It still happened with "Sat Dec 11 18:22:23 GMT 2004".
I don't think preprocessed code or assembly code is of much interest,
as this is all quite visible with a combined tree build, as per
simtest-howto.html.  My last successful build of this port was with
"Wed Apr 21 08:31:07 GMT 2004".  Perhaps time to call on the maintainer?
Ports left broken for a long time should be obsoleted.
Comment 9 Andrew Pinski 2004-12-15 16:59:59 UTC
This is even more minor now since m32r was switched over to using dwarf2 debugging.
Comment 10 Mark Mitchell 2005-01-21 17:31:36 UTC
m32r is not a primary or secondary target; removing target milestone.
Comment 11 Steven Bosscher 2005-07-26 12:01:33 UTC
What should we do with this bug?  If m32r is no longer affected, then 
what is?  Maybe suspend this one or close it as WONTFIX? 
Comment 12 inaoka.kazuhiro 2005-08-10 09:27:11 UTC
m32r is no longer affected.