public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/45689]  New: CSHIFT and EOSHIFT are not in the make-164314p7m1.log list
@ 2010-09-16 10:41 dominiq at lps dot ens dot fr
  2010-09-16 10:42 ` [Bug fortran/45689] CSHIFT and EOSHIFT are not in the trans_func_f2003 list dominiq at lps dot ens dot fr
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-09-16 10:41 UTC (permalink / raw)
  To: gcc-bugs

While playing with modifications of PR4581, I tried

  module m
    implicit none
    type t
      integer :: i
    end type t
    type(t), dimension(2), parameter :: a1  = (/ t(1), t(2) /)
    type(t), dimension(2), parameter :: d = cshift ( a1, 1 )
  end module m

and got

pr45081_red.f90:7.43:

    type(t), dimension(2), parameter :: d = cshift ( a1, 1 )
                                           1
Error: transformational intrinsic 'cshift' at (1) is not permitted in an
initialization expression

The F2003 standard says:

(5) A reference to a transformational standard intrinsic function other than
NULL, where each argument is an initialization expression,

and the F2008 version adds:

(6) a reference to a transformational standard intrinsic function other than
COMMAND ARGUMENT -COUNT, NULL, NUM IMAGES, THIS IMAGE, where each argument is a
constant expression,

This is fixed by the following patch:


--- ../_clean/gcc/fortran/expr.c        2010-09-09 21:06:18.000000000 +0200
+++ gcc/fortran/expr.c  2010-09-16 12:24:49.000000000 +0200
@@ -2329,7 +2329,7 @@ check_transformational (gfc_expr *e)
   };

   static const char * const trans_func_f2003[] =  {
-    "all", "any", "count", "dot_product", "matmul", "null", "pack",
+    "all", "any", "count", "cshift", "dot_product", "eoshift", "matmul",
"null", "pack",
     "product", "repeat", "reshape", "selected_char_kind", "selected_int_kind",
     "selected_real_kind", "spread", "sum", "transfer", "transpose",
     "trim", "unpack", NULL

but then I am back to PR45081!-(even with the Paul's patch).


-- 
           Summary: CSHIFT and EOSHIFT are not in the make-164314p7m1.log
                    list
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dominiq at lps dot ens dot fr


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


^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <bug-45689-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2013-06-25 17:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-16 10:41 [Bug fortran/45689] New: CSHIFT and EOSHIFT are not in the make-164314p7m1.log list dominiq at lps dot ens dot fr
2010-09-16 10:42 ` [Bug fortran/45689] CSHIFT and EOSHIFT are not in the trans_func_f2003 list dominiq at lps dot ens dot fr
2010-09-16 11:14 ` dfranke at gcc dot gnu dot org
2010-09-16 13:09 ` [Bug fortran/45689] [F2003] Missing transformational intrinsic " dominiq at lps dot ens dot fr
2010-09-18 15:58 ` dfranke at gcc dot gnu dot org
     [not found] <bug-45689-4@http.gcc.gnu.org/bugzilla/>
2013-06-25 17:16 ` dominiq at lps dot ens.fr
2013-06-25 17:17 ` dominiq at lps dot ens.fr
2013-06-25 17:27 ` dominiq at lps dot ens.fr

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