This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: patch: ICE in legitimize_pic_address for x86_64 mingw target
- From: Kai Tietz <Kai dot Tietz at onevision dot com>
- To: Danny Smith <dannysmith at clear dot net dot nz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 17 Jul 2007 12:08:50 +0200
- Subject: RE: patch: ICE in legitimize_pic_address for x86_64 mingw target
> > -----Original Message-----
> > From: gcc-patches-owner@gcc.gnu.org
> > [mailto:gcc-patches-owner@gcc.gnu.org] On Behalf Of Kai Tietz
> > Sent: Tuesday, 17 July 2007 9:39 p.m.
> >
> > there is an ICE for __declspec(dllimport) imported variables.
> > The checking
> > of pic seems to be to early in legitimize_address. The check for
> > TARGET_DLLIMPORT_DECL_ATTRIBUTES should be done infront AFAICS.
> >
> > ChangeLog:
> >
> > 2007-03-30 Kai Tietz <kai.tietz@onevision.com>
> >
> > * i386.c: (legitimize_address): Move dllimported
> > variable check
> > infront of legitimizing pic address of CONST symbols.
> >
> >
>
> Your may be right but... how does flag_pic get set on mingw target?
> In cygming.h it says:
> /* Don't allow flag_pic to propagate since gas may produce invalid code
> otherwise. */
>
> #undef SUBTARGET_OVERRIDE_OPTIONS
> #define SUBTARGET_OVERRIDE_OPTIONS \
> do { \
> if (flag_pic) \
> { \
> warning (0, "-f%s ignored for target (all code is position
> independent)",\
> (flag_pic > 1) ? "PIC" : "pic"); \
> flag_pic = 0; \
> } \
> } while (0)
It is set in override_options.
Cheers,
i.A. Kai Tietz
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
------------------------------------------------------------------------------------------
OneVision Software Entwicklungs GmbH & Co. KG
Dr.-Leo-Ritter-StraÃe 9 - 93049 Regensburg
Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
Handelsregister: HRA 6744, Amtsgericht Regensburg
KomplementÃrin: OneVision Software Entwicklungs Verwaltungs GmbH
Dr.-Leo-Ritter-StraÃe 9 â 93049 Regensburg
Handelsregister: HRB 8932, Amtsgericht Regensburg - GeschÃftsfÃhrer:
Ulrike DÃhler, Manuela Kluger