[Bug fortran/35786] OpenMP Fortran PRIVATE on parameter gives error in gfc_finish_var_decl

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Apr 1 13:23:00 GMT 2008



------- Comment #1 from burnus at gcc dot gnu dot org  2008-04-01 13:22 -------
Thanks for the report; the internal compiler error is definitely a compiler
bug. However, I believe the program is invalid.

If I read "2.8.3.3 private clause" in the OpenMP 2.5 specification correctly,
the items in the private(list) need to variables which are definable or
allocatable. However, "ONE" is not even a variable. Thus the program is
invalid. However, an error message such as the one of sunf95 should be given
instead of an ICE.


sunf95 writes:
    !$OMP PARALLEL DO PRIVATE(I, ONE)
                                 ^
"dfff.f90", Line = 14, Column = 34: ERROR: Object ONE must be a variable to be
in the PRIVATE clause of the PARALLEL DO directive.

ifort writes:
    !$OMP PARALLEL DO PRIVATE(I, ONE)
---------------------------------^
fortcom: Error: dfff.f90, line 14: Subobjects are not allowed in this OpenMP
clause; a named variable must be specified.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |diagnostic, ice-on-invalid-
                   |                            |code, openmp
   Last reconfirmed|0000-00-00 00:00:00         |2008-04-01 13:22:13
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35786



More information about the Gcc-bugs mailing list