User account creation filtered due to spam.

Bug 34838 - [4.3 Regression] ICE: Can't convert LOGICAL(1) to LOGICAL(1)
Summary: [4.3 Regression] ICE: Can't convert LOGICAL(1) to LOGICAL(1)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: 4.3.0
Assignee: Thomas Koenig
URL:
Keywords:
Depends on:
Blocks: 32834
  Show dependency treegraph
 
Reported: 2008-01-17 22:33 UTC by Manfred Schwarb
Modified: 2008-01-20 04:48 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-01-19 17:48:25


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manfred Schwarb 2008-01-17 22:33:06 UTC
integer MAXPTS
      PARAMETER (MAXPTS=10000000)

      Logical*1,allocatable,dimension(:) :: bmp,bmpv
      integer :: igds(5)=(/0,0,0,0,0/)

      allocate(bmp(maxpts))
      allocate(bmpv(maxpts))
      bmp(1)=.false.
      bmpv(1)=.true.
      igds(2)=1

      if ( ANY(bmp(1:igds(2)) .NEQV. bmpv(1:igds(2))) ) then
        print*,"hello"
      endif
      end


gives:
demo.f:17.72:

      end
                                                                       1
Internal Error at (1):
demo.f:14.36:

      if ( ANY(bmp(1:igds(2)) .NEQV. bmpv(1:igds(2))) ) then
                                   1
Can't convert LOGICAL(1) to LOGICAL(1) at (1)


this is with
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /projects/tob/gcc/configure --enable-languages=c,fortran --prefix=/projects/tob/gcc-trunk
Thread model: posix
gcc version 4.3.0 20080117 (experimental) [trunk revision 131592] (GCC)
Comment 1 Manfred Schwarb 2008-01-17 22:45:40 UTC
shorter version:
      Logical*1 :: bmp(1),bmpv(1)

      bmp(1)=.false.
      bmpv(1)=.true.

      if ( ANY(bmp(1:1) .NEQV. bmpv(1:1)) ) then
        print*,"hello"
      endif
      end


"Logical", "Logical*2" and "Logical*4" in variable definition work.

"Logical*1" breaks.
Comment 2 Dominique d'Humieres 2008-01-17 22:53:33 UTC
Confirmed and this is a regression as the code works with gfortran 4.3.0 20080102.

Comment 3 Tobias Burnus 2008-01-18 00:03:02 UTC
I think this is fixed by the patch in PR 34817 though I currently cannot test it.
Comment 4 Manfred Schwarb 2008-01-18 08:59:40 UTC
I bisected it using the binaries of Tobias:

gcc-trunk-x86_64-2008-01-15-r131542.tar.gz works
gcc-trunk-x86_64-2008-01-16-r131566.tar.gz is broken

inbetween there exist mainly only 2 relevant commits:
- r131553 Th. Koenig, fiddling with _gfortran_any_l1 and *logical.m4
- r131566 T. Burnus

I doubt somehow that the patch for PR 34817 will help. I will not have time
to check it myself in the next days, though.
Comment 5 Tobias Burnus 2008-01-18 12:49:18 UTC
What puzzles me is that it works with my local tree; it contains several changes (102 insertions(+), 41 deletions(-)), but they should (in principle) not affect this problem. Actually, also the test case of PR 34817 passes here.
Comment 6 Manfred Schwarb 2008-01-18 13:26:36 UTC
Yes, PR 34817 pass (both) for me too, with your binaries as well as with
the binaries of FX.

I just checked my testcase (this PR) with the binaries of FX, it breaks
after 2008-01-15, same as with your binaries.
Comment 7 Thomas Koenig 2008-01-19 17:48:25 UTC
I'm 95% certain this was caused by my patch.
Comment 8 Thomas Koenig 2008-01-19 22:48:39 UTC
Subject: Bug 34838

Author: tkoenig
Date: Sat Jan 19 22:47:47 2008
New Revision: 131660

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131660
Log:
2008-01-19  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/34817
	PR fortran/34838
	* iresolve.c (gfc_resolve_all):  Remove conversion of mask
	argument to kind=1 by removing call to resolve_mask_arg().
	(gfc_resolve_any):  Likewise.

2008-01-19  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/34817
	PR fortran/34838
	* gfortran.dg/any_all_1.f90:  New test.
	* gfortran.dg/any_all_2.f90:  New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/any_all_1.f90
    trunk/gcc/testsuite/gfortran.dg/any_all_2.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/iresolve.c
    trunk/gcc/testsuite/ChangeLog

Comment 9 Thomas Koenig 2008-01-19 22:52:07 UTC
Fixed.  Closing.