public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/34784]  New: implicit character(s) hides type of selected_int_kind intrinsic
@ 2008-01-14 22:38 dick dot hendrickson at gmail dot com
  2008-01-14 23:21 ` [Bug fortran/34784] " burnus at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: dick dot hendrickson at gmail dot com @ 2008-01-14 22:38 UTC (permalink / raw)
  To: gcc-bugs

When I have an IMPLICIT CHARACTER(S) statement above a declaration,
the SELECTED_INT_KIND( ) function is diagnosed as a character function
with the message


u_dimension.f:3.50:

      INTEGER, DIMENSION(0:20) ::  IP_ARRAY1_3_S =
                                                 1
Error: Can't convert CHARACTER(1) to INTEGER(4) at (1)

      MODULE U_TESTS
      implicit character(s)
      INTEGER, DIMENSION(0:20) ::  IP_ARRAY1_3_S =
     $     (/ (SELECTED_INT_KIND(J1),J1=0,20) /)
      END MODULE U_TESTS


Note, I've gotten the same error message in other contexts.  This might
be a broader problem that just the selected_int_kind function in a
unusual use.  If it isn't obvious to you that there is a more general
problem than this isolated example, I'll try to track down some more
examples.

Dick Hendrickson


-- 
           Summary: implicit character(s) hides type of selected_int_kind
                    intrinsic
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dick dot hendrickson at gmail dot com


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


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

* [Bug fortran/34784] implicit character(s) hides type of selected_int_kind intrinsic
  2008-01-14 22:38 [Bug fortran/34784] New: implicit character(s) hides type of selected_int_kind intrinsic dick dot hendrickson at gmail dot com
@ 2008-01-14 23:21 ` burnus at gcc dot gnu dot org
  2008-01-15 21:18 ` dick dot hendrickson at gmail dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-01-14 23:21 UTC (permalink / raw)
  To: gcc-bugs



-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |32834
              nThis|                            |
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2008-01-14 22:42:30
               date|                            |


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


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

* [Bug fortran/34784] implicit character(s) hides type of selected_int_kind intrinsic
  2008-01-14 22:38 [Bug fortran/34784] New: implicit character(s) hides type of selected_int_kind intrinsic dick dot hendrickson at gmail dot com
  2008-01-14 23:21 ` [Bug fortran/34784] " burnus at gcc dot gnu dot org
@ 2008-01-15 21:18 ` dick dot hendrickson at gmail dot com
  2008-01-16 18:23 ` [Bug fortran/34784] [Rgression 4.2, 4.3] " pault at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dick dot hendrickson at gmail dot com @ 2008-01-15 21:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dick dot hendrickson at gmail dot com  2008-01-15 20:49 -------
Another example in executable code

      MODULE s_TESTS
      IMPLICIT CHARACTER (P)
      CONTAINS
      subroutine simple (u,j1)
      optional ::  j1
      if (present (j1)) stop
      end subroutine
      END MODULE s_TESTS


-- 


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


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

* [Bug fortran/34784] [Rgression 4.2, 4.3] implicit character(s) hides type of selected_int_kind intrinsic
  2008-01-14 22:38 [Bug fortran/34784] New: implicit character(s) hides type of selected_int_kind intrinsic dick dot hendrickson at gmail dot com
  2008-01-14 23:21 ` [Bug fortran/34784] " burnus at gcc dot gnu dot org
  2008-01-15 21:18 ` dick dot hendrickson at gmail dot com
@ 2008-01-16 18:23 ` pault at gcc dot gnu dot org
  2008-01-17 21:47 ` [Bug fortran/34784] [Regression " pault at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-01-16 18:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pault at gcc dot gnu dot org  2008-01-16 17:33 -------
This regression enters between 4.1/20050803 and 4.2/20061221.

gfc_check_constructor_type is applying the wrong type, because the intrinsic
has not been resolved. (This is called from gfc_match_init_expr via
gfc_resolve_expr.).

I'll continue to investigate but think that resolution and check_init_expr are
occurring in the wrong order.

Cheers

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|implicit character(s) hides |[Rgression 4.2, 4.3]
                   |type of selected_int_kind   |implicit character(s) hides
                   |intrinsic                   |type of selected_int_kind
                   |                            |intrinsic


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


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

* [Bug fortran/34784] [Regression 4.2, 4.3] implicit character(s) hides type of selected_int_kind intrinsic
  2008-01-14 22:38 [Bug fortran/34784] New: implicit character(s) hides type of selected_int_kind intrinsic dick dot hendrickson at gmail dot com
                   ` (2 preceding siblings ...)
  2008-01-16 18:23 ` [Bug fortran/34784] [Rgression 4.2, 4.3] " pault at gcc dot gnu dot org
@ 2008-01-17 21:47 ` pault at gcc dot gnu dot org
  2008-01-18  9:48 ` pault at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-01-17 21:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pault at gcc dot gnu dot org  2008-01-17 21:34 -------
I have a one line fix for this, which will be applied as obvious tomorrow
morning.

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-01-14 22:42:30         |2008-01-17 21:34:19
               date|                            |


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


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

* [Bug fortran/34784] [Regression 4.2, 4.3] implicit character(s) hides type of selected_int_kind intrinsic
  2008-01-14 22:38 [Bug fortran/34784] New: implicit character(s) hides type of selected_int_kind intrinsic dick dot hendrickson at gmail dot com
                   ` (3 preceding siblings ...)
  2008-01-17 21:47 ` [Bug fortran/34784] [Regression " pault at gcc dot gnu dot org
@ 2008-01-18  9:48 ` pault at gcc dot gnu dot org
  2008-01-20  5:38 ` [Bug fortran/34784] [4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-01-18  9:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pault at gcc dot gnu dot org  2008-01-18 09:25 -------
Dang it!  I posted the fix for this one on PR34785.

It has to hold until the weekend for reasons described there.

Paul


-- 


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


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

* [Bug fortran/34784] [4.2/4.3 Regression] implicit character(s) hides type of selected_int_kind intrinsic
  2008-01-14 22:38 [Bug fortran/34784] New: implicit character(s) hides type of selected_int_kind intrinsic dick dot hendrickson at gmail dot com
                   ` (4 preceding siblings ...)
  2008-01-18  9:48 ` pault at gcc dot gnu dot org
@ 2008-01-20  5:38 ` pinskia at gcc dot gnu dot org
  2008-01-20  8:52 ` pault at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-01-20  5:38 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
            Summary|[Regression 4.2, 4.3]       |[4.2/4.3 Regression]
                   |implicit character(s) hides |implicit character(s) hides
                   |type of selected_int_kind   |type of selected_int_kind
                   |intrinsic                   |intrinsic
   Target Milestone|---                         |4.2.3


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


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

* [Bug fortran/34784] [4.2/4.3 Regression] implicit character(s) hides type of selected_int_kind intrinsic
  2008-01-14 22:38 [Bug fortran/34784] New: implicit character(s) hides type of selected_int_kind intrinsic dick dot hendrickson at gmail dot com
                   ` (5 preceding siblings ...)
  2008-01-20  5:38 ` [Bug fortran/34784] [4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2008-01-20  8:52 ` pault at gcc dot gnu dot org
  2008-01-20  8:57 ` pault at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-01-20  8:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pault at gcc dot gnu dot org  2008-01-20 08:23 -------
Subject: Bug 34784

Author: pault
Date: Sun Jan 20 08:22:56 2008
New Revision: 131675

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131675
Log:
2008-01-20  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/34784
        * array.c (gfc_check_constructor_type): Clear the expression ts
        so that the checking starts from the deepest level of array
        constructor.
        * primary.c (match_varspec): If an unknown type is changed to
        default character and the attempt to match a substring fails,
        change it back to unknown.

        PR fortran/34785
        * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
        NULL for an array constructor, use the cl.length expression to
        build it.
        (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
        a tree assignment.


2008-01-20  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/34784
        * gfortran.dg/array_constructor_20.f90: New test.
        * gfortran.dg/mapping_2.f90: Correct ubound expression for h4.

        PR fortran/34785
        * gfortran.dg/array_constructor_21.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/array_constructor_20.f90
    trunk/gcc/testsuite/gfortran.dg/array_constructor_21.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/array.c
    trunk/gcc/fortran/primary.c
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/34784] [4.2/4.3 Regression] implicit character(s) hides type of selected_int_kind intrinsic
  2008-01-14 22:38 [Bug fortran/34784] New: implicit character(s) hides type of selected_int_kind intrinsic dick dot hendrickson at gmail dot com
                   ` (6 preceding siblings ...)
  2008-01-20  8:52 ` pault at gcc dot gnu dot org
@ 2008-01-20  8:57 ` pault at gcc dot gnu dot org
  2008-01-20 17:04 ` pault at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-01-20  8:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pault at gcc dot gnu dot org  2008-01-20 08:43 -------
Fixed on trunk

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug fortran/34784] [4.2/4.3 Regression] implicit character(s) hides type of selected_int_kind intrinsic
  2008-01-14 22:38 [Bug fortran/34784] New: implicit character(s) hides type of selected_int_kind intrinsic dick dot hendrickson at gmail dot com
                   ` (7 preceding siblings ...)
  2008-01-20  8:57 ` pault at gcc dot gnu dot org
@ 2008-01-20 17:04 ` pault at gcc dot gnu dot org
  2008-01-23 18:38 ` dick dot hendrickson at gmail dot com
  2008-03-30 21:38 ` burnus at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-01-20 17:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pault at gcc dot gnu dot org  2008-01-20 16:59 -------
Subject: Bug 34784

Author: pault
Date: Sun Jan 20 16:58:15 2008
New Revision: 131679

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131679
Log:
2008-01-20  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/34861
        * resolve.c (resolve_entries): Do not do an array bounds check
        if the result symbols are the same.

        PR fortran/34854
        * module.c (read_module) : Hide the symtree of the previous
        version of the symbol if this symbol is renamed.

2008-01-20  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/34784
        * gfortran.dg/mapping_2.f90: Correct ubound expression for h4.

        PR fortran/34861
        * gfortran.dg/entry_array_specs_3.f90: New test.

        PR fortran/34854
        * gfortran.dg/use_rename_1.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/entry_array_specs_3.f90
    trunk/gcc/testsuite/gfortran.dg/use_rename_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/module.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/mapping_2.f90


-- 


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


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

* [Bug fortran/34784] [4.2/4.3 Regression] implicit character(s) hides type of selected_int_kind intrinsic
  2008-01-14 22:38 [Bug fortran/34784] New: implicit character(s) hides type of selected_int_kind intrinsic dick dot hendrickson at gmail dot com
                   ` (8 preceding siblings ...)
  2008-01-20 17:04 ` pault at gcc dot gnu dot org
@ 2008-01-23 18:38 ` dick dot hendrickson at gmail dot com
  2008-03-30 21:38 ` burnus at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: dick dot hendrickson at gmail dot com @ 2008-01-23 18:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dick dot hendrickson at gmail dot com  2008-01-23 18:31 -------
Subject: Re:  [4.2/4.3 Regression] implicit character(s) hides type of
selected_int_kind intrinsic

I have another example of what might be the same problem, although the
symptoms are
a little different.  the error message is

C:gfortran v_ice.f
v_ice.f:21.72:

      END MODULE TESTS
                                                                       1
Internal Error at (1):
gfc_convert_constant(): Unexpected type

If I use either
      IMPLICIT CHARACTER (D)
      IMPLICIT CHARACTER (E)
things compile, although I'd have expected a problem with either
DIGITS or EPSILON.

A procedure question.  Is this the One True Way to add additional
comments or tests
about a bug report?  Or is there a better way?

Dick Hendrickson


      MODULE TESTS
      IMPLICIT CHARACTER (M)
      CONTAINS
      SUBROUTINE VF0010(IDA1,IDA2,RDA,QDA)
      INTEGER(4) IDA1(5)
      INTEGER(4) IDA2(5)
      REAL(4) RLA(5)
      REAL(4) RDA(5)
      REAL(8) QDA(5)
      REAL(8) DCA(5)
!  I N I T I A L I Z A T I O N  S E C T I O N
      INTEGER(KIND=4) :: TEST_ARRAY
     $(SUM((/DIGITS(1),DIGITS(RLA(2)),DIGITS(DCA),DIGITS(QDA)/))/10,
     $  MIN(6_4,
     $       INT((EPSILON(RLA)+EPSILON(ABS(QDA))+EPSILON(DCA))*1.E6)),
     $  INT(MIN(RDA(1),HUGE(RLA)/10)+MIN(QDA(1),HUGE(QDA)/10)
     $      +MIN(1,HUGE(IDA2))),
     $  MIN(6,MAXEXPONENT(1.0_8)+MAXEXPONENT(RLA)+
     $          MAXEXPONENT(QDA)))
      END SUBROUTINE
      END MODULE TESTS


On 20 Jan 2008 16:59:09 -0000, pault at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
>
>
> ------- Comment #7 from pault at gcc dot gnu dot org  2008-01-20 16:59 -------
> Subject: Bug 34784
>
> Author: pault
> Date: Sun Jan 20 16:58:15 2008
> New Revision: 131679
>
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131679
> Log:
> 2008-01-20  Paul Thomas  <pault@gcc.gnu.org>
>
>         PR fortran/34861
>         * resolve.c (resolve_entries): Do not do an array bounds check
>         if the result symbols are the same.
>
>         PR fortran/34854
>         * module.c (read_module) : Hide the symtree of the previous
>         version of the symbol if this symbol is renamed.
>
> 2008-01-20  Paul Thomas  <pault@gcc.gnu.org>
>
>         PR fortran/34784
>         * gfortran.dg/mapping_2.f90: Correct ubound expression for h4.
>
>         PR fortran/34861
>         * gfortran.dg/entry_array_specs_3.f90: New test.
>
>         PR fortran/34854
>         * gfortran.dg/use_rename_1.f90: New test.
>
> Added:
>     trunk/gcc/testsuite/gfortran.dg/entry_array_specs_3.f90
>     trunk/gcc/testsuite/gfortran.dg/use_rename_1.f90
> Modified:
>     trunk/gcc/fortran/ChangeLog
>     trunk/gcc/fortran/module.c
>     trunk/gcc/fortran/resolve.c
>     trunk/gcc/testsuite/ChangeLog
>     trunk/gcc/testsuite/gfortran.dg/mapping_2.f90
>
>
> --
>
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34784
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>


-- 


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


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

* [Bug fortran/34784] [4.2/4.3 Regression] implicit character(s) hides type of selected_int_kind intrinsic
  2008-01-14 22:38 [Bug fortran/34784] New: implicit character(s) hides type of selected_int_kind intrinsic dick dot hendrickson at gmail dot com
                   ` (9 preceding siblings ...)
  2008-01-23 18:38 ` dick dot hendrickson at gmail dot com
@ 2008-03-30 21:38 ` burnus at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-03-30 21:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from burnus at gcc dot gnu dot org  2008-03-30 21:37 -------
(reply to comment #8)
> I have another example of what might be the same problem, although the
> symptoms are a little different.

This test case seems to work meanwhile (both in gfortran 4.3.0 and 4.4.0, it
fails in 4.2.2).


-- 


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


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

end of thread, other threads:[~2008-03-30 21:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-14 22:38 [Bug fortran/34784] New: implicit character(s) hides type of selected_int_kind intrinsic dick dot hendrickson at gmail dot com
2008-01-14 23:21 ` [Bug fortran/34784] " burnus at gcc dot gnu dot org
2008-01-15 21:18 ` dick dot hendrickson at gmail dot com
2008-01-16 18:23 ` [Bug fortran/34784] [Rgression 4.2, 4.3] " pault at gcc dot gnu dot org
2008-01-17 21:47 ` [Bug fortran/34784] [Regression " pault at gcc dot gnu dot org
2008-01-18  9:48 ` pault at gcc dot gnu dot org
2008-01-20  5:38 ` [Bug fortran/34784] [4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
2008-01-20  8:52 ` pault at gcc dot gnu dot org
2008-01-20  8:57 ` pault at gcc dot gnu dot org
2008-01-20 17:04 ` pault at gcc dot gnu dot org
2008-01-23 18:38 ` dick dot hendrickson at gmail dot com
2008-03-30 21:38 ` burnus at gcc dot gnu dot org

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