* RE: [PATCH] Fix PR 32915 dllimport regression
@ 2007-07-28 5:14 Danny Smith
2007-07-28 8:51 ` Paul Thomas
2007-07-28 9:55 ` FX Coudert
0 siblings, 2 replies; 8+ messages in thread
From: Danny Smith @ 2007-07-28 5:14 UTC (permalink / raw)
To: GCC-patches; +Cc: François-Xavier Coudert, GFORTRAN
Wrong subject heading. The PR is 32915
> 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] 8+ messages in thread
* Re: [PATCH] Fix PR 32915 dllimport regression
2007-07-28 5:14 [PATCH] Fix PR 32915 dllimport regression Danny Smith
@ 2007-07-28 8:51 ` Paul Thomas
2007-07-28 9:55 ` FX Coudert
1 sibling, 0 replies; 8+ messages in thread
From: Paul Thomas @ 2007-07-28 8:51 UTC (permalink / raw)
To: Danny Smith; +Cc: GCC-patches, François-Xavier Coudert, GFORTRAN
Danny,
> Wrong subject heading. The PR is 32915
>
I am so pleased to see that somebody else does that!
OK
Paul
>
>>
>> (As an aside why are you using a pthread_once weakref on mingw32?)
>>
>>
I don't know - FX, any ideas?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix PR 32915 dllimport regression
2007-07-28 5:14 [PATCH] Fix PR 32915 dllimport regression Danny Smith
2007-07-28 8:51 ` Paul Thomas
@ 2007-07-28 9:55 ` FX Coudert
1 sibling, 0 replies; 8+ messages in thread
From: FX Coudert @ 2007-07-28 9:55 UTC (permalink / raw)
To: Danny Smith; +Cc: GCC-patches, GFORTRAN
>> 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.
Thanks a lot for providing a patch so quickly!
>> (As an aside why are you using a pthread_once weakref on mingw32?)
It appears on my build for mingw + pthreads-win32; libgfortran/io/
io.h includes gthr.h, which in turns include gthr-posix.h. The only
functions used are then __gthread_mutex_lock and
__gthread_mutex_unlock, to make the I/O library (and the random
number generator) thread-safe (courtesy of Jakub Jelinek).
FX
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] Fix PR 32915 dllimport regression
2007-09-11 17:17 ` François-Xavier Coudert
@ 2007-09-12 11:06 ` Danny Smith
0 siblings, 0 replies; 8+ messages in thread
From: Danny Smith @ 2007-09-12 11:06 UTC (permalink / raw)
To: 'François-Xavier Coudert'; +Cc: 'gcc-patches'
> From: François-Xavier Coudert
> Sent: Wednesday, 12 September 2007 4:43 a.m.
>
> > Thanks for the clarification. I wasn't sure whether my authority
> > extended to such parts of files like i386.[ch].
>
> ping?
I'm not 100% that my patch is "the right thing" . Shouldn't
decl_assembler_name_equal
test for a NULL_TREE (or at least gcc_assert (decl_asmname !=
NULL_TREE))?
Danny
Index: tree.c
===================================================================
*** tree.c (revision 128359)
--- tree.c (working copy)
*************** decl_assembler_name_equal (tree decl, tr
*** 312,317 ****
--- 312,320 ----
{
tree decl_asmname = DECL_ASSEMBLER_NAME (decl);
+ if (decl_asmname == NULL_TREE)
+ return false;
+
if (decl_asmname == asmname)
return true;
>
> FX
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix PR 32915 dllimport regression
2007-08-23 21:04 ` Danny Smith
@ 2007-09-11 17:17 ` François-Xavier Coudert
2007-09-12 11:06 ` Danny Smith
0 siblings, 1 reply; 8+ messages in thread
From: François-Xavier Coudert @ 2007-09-11 17:17 UTC (permalink / raw)
To: Danny Smith; +Cc: gcc-patches
> Thanks for the clarification. I wasn't sure whether my authority
> extended to such parts of files like i386.[ch].
ping?
FX
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] Fix PR 32915 dllimport regression
2007-08-23 19:39 ` Uros Bizjak
@ 2007-08-23 21:04 ` Danny Smith
2007-09-11 17:17 ` François-Xavier Coudert
0 siblings, 1 reply; 8+ messages in thread
From: Danny Smith @ 2007-08-23 21:04 UTC (permalink / raw)
To: 'Uros Bizjak', 'François-Xavier Coudert'
Cc: 'gcc-patches', 'Richard Henderson', jh
> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org
> [mailto:gcc-patches-owner@gcc.gnu.org] On Behalf Of Uros Bizjak
> Sent: Friday, 24 August 2007 7:04 a.m.
> To: François-Xavier Coudert
> Cc: gcc-patches; Richard Henderson; jh@suse.cz; Danny Smith
> Subject: Re: [PATCH] Fix PR 32915 dllimport regression
>
>
> François-Xavier Coudert wrote:
> > >
> > > 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.
> >
>
> This is pure cygwin/mingw stuff, written by the maintainer of this
> (sub-)target. This patch doesn't touch shared code, so it
> doesn't need
> any other approvals. It is OK to commit the patch to mainline.
>
Thanks for the clarification. I wasn't sure whether my authority
extended to such parts of files like i386.[ch].
Danny
> Thanks,
> Uros.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix PR 32915 dllimport regression
2007-08-23 18:38 François-Xavier Coudert
@ 2007-08-23 19:39 ` Uros Bizjak
2007-08-23 21:04 ` Danny Smith
0 siblings, 1 reply; 8+ messages in thread
From: Uros Bizjak @ 2007-08-23 19:39 UTC (permalink / raw)
To: François-Xavier Coudert
Cc: gcc-patches, Richard Henderson, jh, Danny Smith
François-Xavier Coudert wrote:
> >
> > 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.
>
This is pure cygwin/mingw stuff, written by the maintainer of this
(sub-)target. This patch doesn't touch shared code, so it doesn't need
any other approvals. It is OK to commit the patch to mainline.
Thanks,
Uros.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] Fix PR 32915 dllimport regression
@ 2007-08-23 18:38 François-Xavier Coudert
2007-08-23 19:39 ` Uros Bizjak
0 siblings, 1 reply; 8+ messages in thread
From: François-Xavier Coudert @ 2007-08-23 18:38 UTC (permalink / raw)
To: gcc-patches; +Cc: Richard Henderson, jh, ubizjak, Danny Smith
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02024.html
*ping*
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-09-12 10:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-28 5:14 [PATCH] Fix PR 32915 dllimport regression Danny Smith
2007-07-28 8:51 ` Paul Thomas
2007-07-28 9:55 ` FX Coudert
2007-08-23 18:38 François-Xavier Coudert
2007-08-23 19:39 ` Uros Bizjak
2007-08-23 21:04 ` Danny Smith
2007-09-11 17:17 ` François-Xavier Coudert
2007-09-12 11:06 ` 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).