public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR 32195 dllimport regression
@ 2007-07-28  5:11 Danny Smith
  0 siblings, 0 replies; only message in thread
From: Danny Smith @ 2007-07-28  5:11 UTC (permalink / raw)
  To: GCC-patches; +Cc: François-Xavier Coudert, GFORTRAN

Hello

The problem here is that dllimported symbols generated by the compiler
have NULL as a DECL_ASSEMBLER_NAME, so the comparision with the alias
decl_assembler_name_equal segfaults.

This regression is fallout Richard Henderson's rewrite of dllimport,
exposed here by the use of weakref in libgfortran

(As an aside why are you using a pthread_once weakref on mingw32?)

This fixes by giving the artifical dllimport decl an assembler name that
matches the identifier of the SYMBOL_REF. 


:ADDPATCH i386:

2007-07-28  Danny Smith <dannysmith@users.sourcforge.net>

	PR target/32915
	* config/i386/i386.c (get_dllimport_decl):
SET_DECL_ASSEMBLER_NAME
	of the generated dllimport decl. 


Index: config/i386/i386.c
===================================================================
*** config/i386/i386.c	(revision 126996)
--- config/i386/i386.c	(working copy)
*************** get_dllimport_decl (tree decl)
*** 7611,7616 ****
--- 7604,7610 ----
    set_mem_alias_set (rtl, ix86_GOT_alias_set ());
  
    SET_DECL_RTL (to, rtl);
+   SET_DECL_ASSEMBLER_NAME (to, get_identifier (name));
  
    return to;
  }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-28  2:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-28  5:11 [PATCH] Fix PR 32195 dllimport regression Danny Smith

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