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

* [Bug fortran/45689] CSHIFT and EOSHIFT are not in the trans_func_f2003 list
  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 ` dominiq at lps dot ens dot fr
  2010-09-16 11:14 ` dfranke at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-09-16 10:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dominiq at lps dot ens dot fr  2010-09-16 10:42 -------
pasto!-(


-- 

dominiq at lps dot ens dot fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|CSHIFT and EOSHIFT are not  |CSHIFT and EOSHIFT are not
                   |in the make-164314p7m1.log  |in the trans_func_f2003 list
                   |list                        |


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/45689] CSHIFT and EOSHIFT are not in the trans_func_f2003 list
  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
  3 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-09-16 11:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dfranke at gcc dot gnu dot org  2010-09-16 11:14 -------
They are not, as there, afaik, are no simplifiers yet.

Hence, with your patch they will be accepted, but you'd end up with wrong code
at the end, as the functions are not properly simplified and thus not constant.


-- 


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/45689] [F2003] Missing transformational intrinsic in the trans_func_f2003 list
  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 ` dominiq at lps dot ens dot fr
  2010-09-18 15:58 ` dfranke at gcc dot gnu dot org
  3 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-09-16 13:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dominiq at lps dot ens dot fr  2010-09-16 13:09 -------
MAXLOC and MINLOC are also missing (see pr25104).

> They are not, as there, afaik, are no simplifiers yet.
>
> Hence, with your patch they will be accepted, but you'd end up with wrong code
> at the end, as the functions are not properly simplified and thus not constant.

I have seen that, and also in gcc/fortran/simplify.c

    /* FIXME: Returning here avoids a regression in array_simplify_1.f90.
       Replace NULL with gcc_unreachable() after implementing
       gfc_simplify_cshift(). */

Am I correct to understand that the current situation (i.e. the error message)
is a temporary fix for some missing gfc_simplify_*?


-- 

dominiq at lps dot ens dot fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|CSHIFT and EOSHIFT are not  |[F2003] Missing
                   |in the trans_func_f2003 list|transformational intrinsic
                   |                            |in the trans_func_f2003 list


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/45689] [F2003] Missing transformational intrinsic in the trans_func_f2003 list
  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
                   ` (2 preceding siblings ...)
  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
  3 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-09-18 15:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dfranke at gcc dot gnu dot org  2010-09-18 15:58 -------
(In reply to comment #3)
> Am I correct to understand that the current situation (i.e. the error message)
> is a temporary fix for some missing gfc_simplify_*?

If the error message you refer to is

> Error: transformational intrinsic 'cshift' at (1) is not permitted in an
> initialization expression

then yes.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/45689] [F2003] Missing transformational intrinsic in the trans_func_f2003 list
       [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
  2 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-25 17:27 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Joost.VandeVondele at mat dot ethz
                   |                            |.ch

--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
*** Bug 25104 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/45689] [F2003] Missing transformational intrinsic in the trans_func_f2003 list
       [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
  2 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-25 17:17 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
*** Bug 29962 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/45689] [F2003] Missing transformational intrinsic in the trans_func_f2003 list
       [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
  2 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-25 17:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
>From http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29962#c20

Transformational intrinsics, done are:
 * all, any, count
 * product, sum
 * dot_product, matmul, transpose
 * pack, unpack, spread

Left:
 * maxloc, minloc
 * maxval, minval (generic case)
 * cshift, eoshift

While at it, see also PR29600 (kind arguments) and PR36313 (character type).

Earlier this year, I was working on the cshift/eoshift, but I strongly believe
that the linear list that builds the constructor must be replaced with splay
trees before this can be implemented somewhat efficiently.

I think what is left in pr29962 is a duplicate of this one.


^ permalink raw reply	[flat|nested] 8+ messages in thread

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