* Bug 47030 - porting draft patch
@ 2018-03-03 7:20 Marco Atzeri
2018-03-03 22:34 ` Steve Kargl
0 siblings, 1 reply; 2+ messages in thread
From: Marco Atzeri @ 2018-03-03 7:20 UTC (permalink / raw)
To: fortran
On windows platform the "!GCC$ Attributes do not work for COMMON
variables in procedures and BLOCK DATA"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030
is blocking me in porting some software to cygwin.
As finally I am able to build the compiler on my system
I was trying to adapt the draft.patch to 6.4.0
but the second portion of this block
---------------
diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c
index ad4ef06..72d9181 100644
--- a/gcc/fortran/trans-common.c
+++ b/gcc/fortran/trans-common.c
@@ -415,6 +415,8 @@ build_common_decl (gfc_common_head *com, tree
union_type, bool is_init)
/* If there is no backend_decl for the common block, build it. */
if (decl == NULL_TREE)
{
+ tree attributes;
+
decl = build_decl (input_location,
VAR_DECL, get_identifier (com->name), union_type);
gfc_set_decl_assembler_name (decl, gfc_sym_mangled_common_id (com));
@@ -440,6 +442,9 @@ build_common_decl (gfc_common_head *com, tree
union_type, bool is_init)
gfc_set_decl_location (decl, &com->where);
+ attributes = gfc_add_attributes_to_decl (common_sym->attr,
NULL_TREE);
+ decl_attributes (&decl, attributes, 0);
+
if (com->threadprivate)
DECL_TLS_MODEL (decl) = decl_default_tls_model (decl);
--------------
have two issues:
1) no clue of what common_sym should be
2) decl_attributes is not yet defined at that stage
Suggestion will be appreciated
Marco
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug 47030 - porting draft patch
2018-03-03 7:20 Bug 47030 - porting draft patch Marco Atzeri
@ 2018-03-03 22:34 ` Steve Kargl
0 siblings, 0 replies; 2+ messages in thread
From: Steve Kargl @ 2018-03-03 22:34 UTC (permalink / raw)
To: Marco Atzeri; +Cc: fortran
On Sat, Mar 03, 2018 at 08:20:45AM +0100, Marco Atzeri wrote:
> On windows platform the "!GCC$ Attributes do not work for COMMON
> variables in procedures and BLOCK DATA"
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030
>
> is blocking me in porting some software to cygwin.
>
> As finally I am able to build the compiler on my system
> I was trying to adapt the draft.patch to 6.4.0
> but the second portion of this block
>
> ---------------
> diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c
> index ad4ef06..72d9181 100644
> --- a/gcc/fortran/trans-common.c
> +++ b/gcc/fortran/trans-common.c
> @@ -415,6 +415,8 @@ build_common_decl (gfc_common_head *com, tree
> union_type, bool is_init)
> /* If there is no backend_decl for the common block, build it. */
> if (decl == NULL_TREE)
> {
> + tree attributes;
> +
> decl = build_decl (input_location,
> VAR_DECL, get_identifier (com->name), union_type);
> gfc_set_decl_assembler_name (decl, gfc_sym_mangled_common_id (com));
> @@ -440,6 +442,9 @@ build_common_decl (gfc_common_head *com, tree
> union_type, bool is_init)
>
> gfc_set_decl_location (decl, &com->where);
>
> + attributes = gfc_add_attributes_to_decl (common_sym->attr,
> NULL_TREE);
> + decl_attributes (&decl, attributes, 0);
> +
> if (com->threadprivate)
> DECL_TLS_MODEL (decl) = decl_default_tls_model (decl);
>
> --------------
>
> have two issues:
> 1) no clue of what common_sym should be
> 2) decl_attributes is not yet defined at that stage
>
Marco,
Unfortunately, you're treading into a part of the compiler
on a platform that few (if any) current gfortran hackers
work. IIRC, the person, who opened the PR, is the developer
that did most of the $GCC work. Tobias has moved on to
other things in life.
--
Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-03 22:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-03 7:20 Bug 47030 - porting draft patch Marco Atzeri
2018-03-03 22:34 ` Steve Kargl
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).