Bug 26015 - [4.1/4.2/4.3 Regression] ICE during bootstrap for vax architecture
Summary: [4.1/4.2/4.3 Regression] ICE during bootstrap for vax architecture
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.2.0
: P5 normal
Target Milestone: 4.1.3
Assignee: Jim Wilson
URL:
Keywords: build, ice-on-valid-code
Depends on:
Blocks: 26504
  Show dependency treegraph
 
Reported: 2006-01-29 03:51 UTC by hbent
Modified: 2008-01-11 21:52 UTC (History)
3 users (show)

See Also:
Host:
Target: vax--netbsdelf
Build: i386-unknown-netbsdelf3.99.5
Known to work:
Known to fail:
Last reconfirmed: 2006-02-02 17:48:06


Attachments
untested patch for vax dwarf2 failure (418 bytes, patch)
2006-02-16 02:29 UTC, Jim Wilson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hbent 2006-01-29 03:51:06 UTC
Configure a current subversion copy of gcc with --target=vax--netbsdelf, do "make bootstrap."  Watch it fail during stage1 like so:

...
for d in libgcc; do \
  if [ -d $d ]; then true; else /bin/sh ../../gcc/../mkinstalldirs $d; fi; \
done
mkdir libgcc
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/usr/src/gcc/vax/./gcc/xgcc -B/usr/src/gcc/vax/./gcc/ -B/usr/local/vax--netbsdelf/bin/ -B/usr/local/vax--netbsdelf/lib/ -isystem /usr/local/vax--netbsdelf/include -isystem /usr/local/vax--netbsdelf/sys-include -O2  -O2 -g -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/usr/pkg/include  -I../../gcc/../libdecnumber -I../libdecnumber -DL_muldi3 -c ../../gcc/libgcc2.c -o libgcc/./_muldi3.o
../../gcc/libgcc2.c: In function '__muldi3':
../../gcc/libgcc2.c:520: internal compiler error: in compute_frame_pointer_to_cfa_displacement, at dwarf2out.c:10443
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Andrew Pinski 2006-01-29 04:38:05 UTC
First you cannot do a bootstrap with a cross, it will not work.
Comment 2 hbent 2006-01-29 07:06:27 UTC
My mistake, I was doing two builds at once and got mixed up.  This error was produced with configure as so:

../configure --target=vax--netbsdelf --disable-nls --enable-languages=c --disable-shared

and then just a regular "gmake" to build.  I have lib and include dirs symlinked from a NetBSD/vax 2.0 install.
Comment 3 Andrew Pinski 2006-02-02 17:08:53 UTC
Can you attach the preprocessed source?
Comment 4 Andrew Pinski 2006-02-02 17:48:06 UTC
Confirmed, reduced testcase:
void __muldi3 (long long u,long long v){}
Comment 5 Jim Wilson 2006-02-16 02:26:27 UTC
This is failing in code that Richard Henderson added.  It is trying to compute the frame pointer to CFA offset by running register elimination on the arg pointer.  The vax however has a hardware arg pointer, maintained by the call instruction, and hence does not do any register elimination.  We then hit an assert because we still have an arg pointer after register elimination.

This problem can be avoided by defining the FRAME_POINTER_CFA_OFFSET macro.  The value of this depends on how the vax call instruction works, and I don't happen to have docs for that.  I also don't happen to have access to vax hardware.  Assuming FP and SP have the same value on function entry, a value of zero should work here.  This assumption be testing by verifying that the gdb testsuite works OK with this change.
Comment 6 Jim Wilson 2006-02-16 02:29:18 UTC
Created attachment 10859 [details]
untested patch for vax dwarf2 failure

This patch allows the testcase to compile, but is otherwise untested.  This needs to be checked against hardware docs, and tested against the gdb testsuite.
Comment 7 Mark Mitchell 2006-09-07 01:12:43 UTC
VAX is not a primary or secondary platform.
Comment 8 hbent 2006-11-07 04:25:09 UTC
This patch fixes the cross-compile such that it completes and is a valid compiler able to generate valid code.  I cannot comment on any of the more "official" tests.
Comment 9 Steven Bosscher 2007-12-18 20:31:35 UTC
Based on comment #8, the patch of comment #6 should probably be committed.  Jim, do you have plans to take care of this?
Comment 10 Jim Wilson 2008-01-11 21:42:47 UTC
Subject: Bug 26015

Author: wilson
Date: Fri Jan 11 21:42:03 2008
New Revision: 131477

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131477
Log:
PR target/26015
* config/vax/elf.h (FRAME_POINTER_CFA_OFFSET): Define.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/vax/elf.h

Comment 11 Jim Wilson 2008-01-11 21:50:59 UTC
Mine, as I wrote a patch for it.
Comment 12 Jim Wilson 2008-01-11 21:52:00 UTC
Fixed on mainline.