public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30207]  New: ICE in gfc_dep_resolver
@ 2006-12-14  3:02 deji_aking at yahoo dot ca
  2006-12-14  3:06 ` [Bug fortran/30207] [4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: deji_aking at yahoo dot ca @ 2006-12-14  3:02 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1799 bytes --]

A trimmed down version of the code which produce the ice is below; The full
code once compile with version 4.1.0, I believe

>>
!
    SUBROUTINE POSL(LAT,LON,JUL,HEURE,MIN,PAZ)

     IMPLICIT NONE
!
     REAL,SAVE :: XPI                ! Pi
     REAL, DIMENSION(:), INTENT(IN):: LAT, LON, JUL, HEURE, MIN 
     REAL, DIMENSION(:),INTENT(OUT):: PAZ
     REAL                                :: ZPI2, ZCDR
!
     REAL, DIMENSION(SIZE(LAT))         :: ZXLON, ZXLON2

      ZPI2 = 2*XPI
      ZCDR = ZPI2/360 

! Position du soleil avec Heure = TU
! Azenit,Azimut en radian
 !
      ZXLON(:)  = 0.
      ZXLON2(:)  = LON(:)
      WHERE(ZXLON < 0.0)
         ZXLON(:) = 360. + ZXLON2(:)         
      END WHERE
!
      PAZ(:)= 0.5*XPI - 0.0
!
    END SUBROUTINE POSL 
>>
[armnlib@agape test1]$ gfortran --version
GNU Fortran 95 (GCC) 4.2.0 20061211 (prerelease)
Copyright (C) 2006 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

[armnlib@agape test1]$ gfortran -c posl.f90
posl.f90: In function ‘posl’:
posl.f90:20: internal compiler error: in gfc_dep_resolver, at
fortran/dependency.c:1167
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: ICE in gfc_dep_resolver
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: deji_aking at yahoo dot ca


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


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

* [Bug fortran/30207] [4.2/4.3 Regression] ICE in gfc_dep_resolver
  2006-12-14  3:02 [Bug fortran/30207] New: ICE in gfc_dep_resolver deji_aking at yahoo dot ca
@ 2006-12-14  3:06 ` pinskia at gcc dot gnu dot org
  2006-12-14  3:11 ` [Bug fortran/30207] [4.2/4.3 Regression] ICE in gfc_dep_resolver with where (a < 0) a(:) = 1 pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-14  3:06 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
            Summary|ICE in gfc_dep_resolver     |[4.2/4.3 Regression] ICE in
                   |                            |gfc_dep_resolver
   Target Milestone|---                         |4.2.0


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


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

* [Bug fortran/30207] [4.2/4.3 Regression] ICE in gfc_dep_resolver with where (a < 0) a(:) = 1
  2006-12-14  3:02 [Bug fortran/30207] New: ICE in gfc_dep_resolver deji_aking at yahoo dot ca
  2006-12-14  3:06 ` [Bug fortran/30207] [4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2006-12-14  3:11 ` pinskia at gcc dot gnu dot org
  2006-12-14  3:28 ` kargl at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-14  3:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-12-14 03:10 -------
Confirmed, reduced testcase:
     IMPLICIT NONE
     REAL, DIMENSION(2)         :: ZXLON
      WHERE(ZXLON < 0.0)
         ZXLON(:) = 1
      END WHERE
    END PROGRAM


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-12-14 03:10:50
               date|                            |
            Summary|[4.2/4.3 Regression] ICE in |[4.2/4.3 Regression] ICE in
                   |gfc_dep_resolver            |gfc_dep_resolver with where
                   |                            |(a < 0) a(:) = 1


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


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

* [Bug fortran/30207] [4.2/4.3 Regression] ICE in gfc_dep_resolver with where (a < 0) a(:) = 1
  2006-12-14  3:02 [Bug fortran/30207] New: ICE in gfc_dep_resolver deji_aking at yahoo dot ca
  2006-12-14  3:06 ` [Bug fortran/30207] [4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
  2006-12-14  3:11 ` [Bug fortran/30207] [4.2/4.3 Regression] ICE in gfc_dep_resolver with where (a < 0) a(:) = 1 pinskia at gcc dot gnu dot org
@ 2006-12-14  3:28 ` kargl at gcc dot gnu dot org
  2006-12-14  5:03 ` kargl at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: kargl at gcc dot gnu dot org @ 2006-12-14  3:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from kargl at gcc dot gnu dot org  2006-12-14 03:28 -------
(In reply to comment #1)
> Confirmed, reduced testcase:
>      IMPLICIT NONE
>      REAL, DIMENSION(2)         :: ZXLON
>       WHERE(ZXLON < 0.0)
>          ZXLON(:) = 1
>       END WHERE
>     END PROGRAM
> 

A work around is to not use the array section.  That is, change
"ZXLON(:) = 1" to "ZXLON = 1"


-- 


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


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

* [Bug fortran/30207] [4.2/4.3 Regression] ICE in gfc_dep_resolver with where (a < 0) a(:) = 1
  2006-12-14  3:02 [Bug fortran/30207] New: ICE in gfc_dep_resolver deji_aking at yahoo dot ca
                   ` (2 preceding siblings ...)
  2006-12-14  3:28 ` kargl at gcc dot gnu dot org
@ 2006-12-14  5:03 ` kargl at gcc dot gnu dot org
  2006-12-16 19:29 ` roger at eyesopen dot com
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: kargl at gcc dot gnu dot org @ 2006-12-14  5:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from kargl at gcc dot gnu dot org  2006-12-14 05:03 -------
I have a patch/hack to fix this.


-- 

kargl at gcc dot gnu dot org changed:

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


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


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

* [Bug fortran/30207] [4.2/4.3 Regression] ICE in gfc_dep_resolver with where (a < 0) a(:) = 1
  2006-12-14  3:02 [Bug fortran/30207] New: ICE in gfc_dep_resolver deji_aking at yahoo dot ca
                   ` (3 preceding siblings ...)
  2006-12-14  5:03 ` kargl at gcc dot gnu dot org
@ 2006-12-16 19:29 ` roger at eyesopen dot com
  2006-12-16 21:21 ` jvdelisle at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: roger at eyesopen dot com @ 2006-12-16 19:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from roger at eyesopen dot com  2006-12-16 19:28 -------
Steve posted his fix at http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01012.html
and I came up with an improved version that correctly identifies the
equivalence
of "z" and "z(:)" here http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01094.html

Sorry for the inconvenience.  It looks like I introduced this regression whilst
restructuring gfc_dep_resolver.  As penance, I'm currently investigating a
related gfortran optimization, that can use the proposed gfc_full_array_ref_p,
to improve the code generated for your POSL function even further.


-- 

roger at eyesopen dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger at eyesopen dot com
           Keywords|                            |patch


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


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

* [Bug fortran/30207] [4.2/4.3 Regression] ICE in gfc_dep_resolver with where (a < 0) a(:) = 1
  2006-12-14  3:02 [Bug fortran/30207] New: ICE in gfc_dep_resolver deji_aking at yahoo dot ca
                   ` (4 preceding siblings ...)
  2006-12-16 19:29 ` roger at eyesopen dot com
@ 2006-12-16 21:21 ` jvdelisle at gcc dot gnu dot org
  2006-12-17 18:28 ` sayle at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-12-16 21:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jvdelisle at gcc dot gnu dot org  2006-12-16 21:21 -------
I have tested Rogers patch with the gfortran testsuite and cp2k and no
regressions.  


-- 


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


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

* [Bug fortran/30207] [4.2/4.3 Regression] ICE in gfc_dep_resolver with where (a < 0) a(:) = 1
  2006-12-14  3:02 [Bug fortran/30207] New: ICE in gfc_dep_resolver deji_aking at yahoo dot ca
                   ` (5 preceding siblings ...)
  2006-12-16 21:21 ` jvdelisle at gcc dot gnu dot org
@ 2006-12-17 18:28 ` sayle at gcc dot gnu dot org
  2006-12-17 21:10 ` deji_aking at yahoo dot ca
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: sayle at gcc dot gnu dot org @ 2006-12-17 18:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from sayle at gcc dot gnu dot org  2006-12-17 18:28 -------
Subject: Bug 30207

Author: sayle
Date: Sun Dec 17 18:28:07 2006
New Revision: 119990

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119990
Log:
2006-12-17  Roger Sayle  <roger@eyesopen.com>
            Steven G. Kargl  <kargl@gcc.gnu.org>

        PR fortran/30207
        * dependency.c (gfc_full_array_ref_p): New function to test whether
        the given array ref specifies the entire array.
        (gfc_dep_resolver): Use gfc_full_array_ref_p to analyze AR_FULL
        array refs against AR_SECTION array refs, and vice versa.
        * dependency.h (gfc_full_array_ref_p): Prototype here.
        * trans-array.c (gfc_conv_expr_descriptor): Use gfc_full_array_ref_p.

        * gfortran.fortran-torture/execute/where21.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.fortran-torture/execute/where21.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/dependency.c
    trunk/gcc/fortran/dependency.h
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/30207] [4.2/4.3 Regression] ICE in gfc_dep_resolver with where (a < 0) a(:) = 1
  2006-12-14  3:02 [Bug fortran/30207] New: ICE in gfc_dep_resolver deji_aking at yahoo dot ca
                   ` (6 preceding siblings ...)
  2006-12-17 18:28 ` sayle at gcc dot gnu dot org
@ 2006-12-17 21:10 ` deji_aking at yahoo dot ca
  2006-12-21  3:52 ` deji_aking at yahoo dot ca
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: deji_aking at yahoo dot ca @ 2006-12-17 21:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from deji_aking at yahoo dot ca  2006-12-17 21:10 -------
Thanks Rogers and Steve for the resolution of this bug. I hope you'll not
forget to commit it to the gcc-4.2 branch.

PS: I've applied the patch cleanly to the 4.2 branch but have not got the
opportunity to build and test it.


-- 


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


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

* [Bug fortran/30207] [4.2/4.3 Regression] ICE in gfc_dep_resolver with where (a < 0) a(:) = 1
  2006-12-14  3:02 [Bug fortran/30207] New: ICE in gfc_dep_resolver deji_aking at yahoo dot ca
                   ` (7 preceding siblings ...)
  2006-12-17 21:10 ` deji_aking at yahoo dot ca
@ 2006-12-21  3:52 ` deji_aking at yahoo dot ca
  2006-12-21  4:37 ` jvdelisle at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: deji_aking at yahoo dot ca @ 2006-12-21  3:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from deji_aking at yahoo dot ca  2006-12-21 03:52 -------
I've applied the fix to 4.2 branch, built and tested it, and it works fine. I
guess the bug can be closed now. Thanks all.


-- 

deji_aking at yahoo dot ca changed:

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


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


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

* [Bug fortran/30207] [4.2/4.3 Regression] ICE in gfc_dep_resolver with where (a < 0) a(:) = 1
  2006-12-14  3:02 [Bug fortran/30207] New: ICE in gfc_dep_resolver deji_aking at yahoo dot ca
                   ` (8 preceding siblings ...)
  2006-12-21  3:52 ` deji_aking at yahoo dot ca
@ 2006-12-21  4:37 ` jvdelisle at gcc dot gnu dot org
  2006-12-21 18:55 ` [Bug fortran/30207] [4.2 " sayle at gcc dot gnu dot org
  2006-12-24  5:03 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-12-21  4:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jvdelisle at gcc dot gnu dot org  2006-12-21 04:37 -------
Keep open until we remember to commit to 4.2  Thanks for confirming the fix.


-- 

jvdelisle at gcc dot gnu dot org changed:

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


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


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

* [Bug fortran/30207] [4.2 Regression] ICE in gfc_dep_resolver with where (a < 0) a(:) = 1
  2006-12-14  3:02 [Bug fortran/30207] New: ICE in gfc_dep_resolver deji_aking at yahoo dot ca
                   ` (9 preceding siblings ...)
  2006-12-21  4:37 ` jvdelisle at gcc dot gnu dot org
@ 2006-12-21 18:55 ` sayle at gcc dot gnu dot org
  2006-12-24  5:03 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: sayle at gcc dot gnu dot org @ 2006-12-21 18:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from sayle at gcc dot gnu dot org  2006-12-21 18:54 -------
Subject: Bug 30207

Author: sayle
Date: Thu Dec 21 18:54:37 2006
New Revision: 120116

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120116
Log:
2006-12-21  Roger Sayle  <roger@eyesopen.com>
            Steven G. Kargl  <kargl@gcc.gnu.org>

        PR fortran/30207
        * dependency.c (gfc_full_array_ref_p): New function to test whether
        the given array ref specifies the entire array.
        (gfc_dep_resolver): Use gfc_full_array_ref_p to analyze AR_FULL
        array refs against AR_SECTION array refs, and vice versa.
        * dependency.h (gfc_full_array_ref_p): Prototype here.
        * trans-array.c (gfc_conv_expr_descriptor): Use gfc_full_array_ref_p.

        * gfortran.fortran-torture/execute/where21.f90: New test.


Added:
   
branches/gcc-4_2-branch/gcc/testsuite/gfortran.fortran-torture/execute/where21.f90
Modified:
    branches/gcc-4_2-branch/gcc/fortran/ChangeLog
    branches/gcc-4_2-branch/gcc/fortran/dependency.c
    branches/gcc-4_2-branch/gcc/fortran/dependency.h
    branches/gcc-4_2-branch/gcc/fortran/trans-array.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/30207] [4.2 Regression] ICE in gfc_dep_resolver with where (a < 0) a(:) = 1
  2006-12-14  3:02 [Bug fortran/30207] New: ICE in gfc_dep_resolver deji_aking at yahoo dot ca
                   ` (10 preceding siblings ...)
  2006-12-21 18:55 ` [Bug fortran/30207] [4.2 " sayle at gcc dot gnu dot org
@ 2006-12-24  5:03 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-24  5:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pinskia at gcc dot gnu dot org  2006-12-24 05:03 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2006-12-24  5:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-14  3:02 [Bug fortran/30207] New: ICE in gfc_dep_resolver deji_aking at yahoo dot ca
2006-12-14  3:06 ` [Bug fortran/30207] [4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
2006-12-14  3:11 ` [Bug fortran/30207] [4.2/4.3 Regression] ICE in gfc_dep_resolver with where (a < 0) a(:) = 1 pinskia at gcc dot gnu dot org
2006-12-14  3:28 ` kargl at gcc dot gnu dot org
2006-12-14  5:03 ` kargl at gcc dot gnu dot org
2006-12-16 19:29 ` roger at eyesopen dot com
2006-12-16 21:21 ` jvdelisle at gcc dot gnu dot org
2006-12-17 18:28 ` sayle at gcc dot gnu dot org
2006-12-17 21:10 ` deji_aking at yahoo dot ca
2006-12-21  3:52 ` deji_aking at yahoo dot ca
2006-12-21  4:37 ` jvdelisle at gcc dot gnu dot org
2006-12-21 18:55 ` [Bug fortran/30207] [4.2 " sayle at gcc dot gnu dot org
2006-12-24  5:03 ` pinskia 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).