This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gomp - equivalence for threadprivate data


Tobias Burnus wrote:
Matevz Tadel wrote:
I filled a bugreport (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38979)
to track this.
First, thank you all for taking interest in this.

Tobias wrote in the comment to the bug report that simply removing the
error might already be enough.
If you can point us to the place where this error is generated we can
test if disabling it (or changing it to a warning) produces the
desired results.
You can try the following patch (completely untested).

Tobias

Index: gcc/fortran/symbol.c
===================================================================
--- gcc/fortran/symbol.c    (revision 143664)
+++ gcc/fortran/symbol.c    (working copy)
@@ -477,7 +477,6 @@
   conf (in_equivalence, result);
   conf (in_equivalence, entry);
   conf (in_equivalence, allocatable);
-  conf (in_equivalence, threadprivate);

   conf (in_namelist, pointer);
   conf (in_namelist, allocatable);

We got GEANT3 working in parallel mode. In fact there was much more work with the surrounding c++ code.


Equivalence with common members works ok.

There is a problem for saved varibales - there the equivalence does not work.
One has two options:
1. Remove the equivalence statements and replace the aliases in the code.
2. Create a "local" common block with the saved variables. If the variables
   were initialized via data statements one has to take care of that at the
   first entry into the routine.

Thank you all for your help! Please let us know if there's anything we can do to help getting this extension into the gcc repository.

Best,
Matevz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]