public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/20436] New: usring nested reshape functions gives runtime error
@ 2005-03-12  6:23 kamaraju at gmail dot com
  2005-03-12 18:02 ` [Bug libfortran/20436] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: kamaraju at gmail dot com @ 2005-03-12  6:23 UTC (permalink / raw)
  To: gcc-bugs

$cat nested_reshape.f90

program nested_reshape
  implicit none
  real :: k(8,2)
  real :: o(8,2)

  k =
reshape((/1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0/),
(/8,2/))

  o = reshape(reshape(k, (/2,8/), order=(/2,1/)), (/8,2/))
end program

This program compiles fine, but gives a runtime error

$gfortran nested_reshape.f90

$./a.out
Fortran runtime error: shape and target do not conform

the program compiles and runs fine with an intel compiler.

$ifort -e95 nested_reshape.f90
$./a.out

Using Debian Sid distribution.

$uname -a
Linux kusumanchi 2.6.9-1-686 #1 Thu Nov 25 03:48:29 EST 2004 i686 GNU/Linux

$gfortran -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada
--prefix=/usr/lib/gcc-snapshot --enable-shared --with-system-zlib --enable-nls
--enable-threads=posix --without-included-gettext --disable-werror
--enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-java-gc=boehm
--enable-java-awt=gtk --enable-gtk-cairo --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.0 20050227 (experimental)

$ifort -v
Version 8.1

-- 
           Summary: usring nested reshape functions gives runtime error
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kamaraju at gmail dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug libfortran/20436] usring nested reshape functions gives runtime error
  2005-03-12  6:23 [Bug fortran/20436] New: usring nested reshape functions gives runtime error kamaraju at gmail dot com
@ 2005-03-12 18:02 ` pinskia at gcc dot gnu dot org
  2005-04-22 20:03 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-12 18:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-12 18:01 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|fortran                     |libfortran
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-03-12 18:01:53
               date|                            |


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


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

* [Bug libfortran/20436] usring nested reshape functions gives runtime error
  2005-03-12  6:23 [Bug fortran/20436] New: usring nested reshape functions gives runtime error kamaraju at gmail dot com
  2005-03-12 18:02 ` [Bug libfortran/20436] " pinskia at gcc dot gnu dot org
@ 2005-04-22 20:03 ` cvs-commit at gcc dot gnu dot org
  2005-04-27 10:18 ` [Bug libfortran/20436] [4.0 only] using " tkoenig at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-22 20:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-22 20:02 -------
Subject: Bug 20436

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tkoenig@gcc.gnu.org	2005-04-22 20:02:44

Modified files:
	gcc/testsuite  : ChangeLog 
	libgfortran    : ChangeLog 
	libgfortran/generated: reshape_i4.c reshape_i8.c 
	libgfortran/intrinsics: reshape_generic.c 
	libgfortran/m4 : reshape.m4 
Added files:
	gcc/testsuite/gfortran.dg: nested_reshape.f90 reshape-alloc.f90 
	                           reshape.f90 

Log message:
	05-04-22  Thomas Koenig  <Thomas.Koenig@online.de>
	
	PR libfortran/20074
	PR libfortran/20436
	PR libfortran/21108
	* gfortran.dg/nested_reshape.f90: new test
	* gfortran.dg/reshape-alloc.f90: new test
	* gfortran.dg/reshape.f90: new test
	
	2005-04-22  Thomas Koenig  <Thomas.Koenig@online.de>
	
	PR libfortran/20074
	PR libfortran/20436
	PR libfortran/21108
	* m4/reshape.m4 (reshape_`'rtype_kind):  rs, rex:  New
	variables, to be used in calculation of return array sizes.
	Populate return array descriptor if ret->data is NULL.
	Fix condition for early return (it used to test something
	undefined if order was used).
	Remove duplicate check wether pad is used.
	* intrinsics/reshape_generic.c (reshape_generic): Likewise.
	Fix a few places where the wrong variables were set.
	* generated/reshape_i4.c: Regenerated.
	* generated/reshape_i8.c: Regenerated.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/nested_reshape.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/reshape-alloc.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/reshape.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5383&r2=1.5384
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.198&r2=1.199
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/generated/reshape_i4.c.diff?cvsroot=gcc&r1=1.6&r2=1.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/generated/reshape_i8.c.diff?cvsroot=gcc&r1=1.6&r2=1.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/intrinsics/reshape_generic.c.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/m4/reshape.m4.diff?cvsroot=gcc&r1=1.7&r2=1.8



-- 


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


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

* [Bug libfortran/20436] [4.0 only] using nested reshape functions gives runtime error
  2005-03-12  6:23 [Bug fortran/20436] New: usring nested reshape functions gives runtime error kamaraju at gmail dot com
  2005-03-12 18:02 ` [Bug libfortran/20436] " pinskia at gcc dot gnu dot org
  2005-04-22 20:03 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-27 10:18 ` tkoenig at gcc dot gnu dot org
  2005-05-21 19:57 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-04-27 10:18 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.0.0
      Known to work|                            |4.1.0
            Summary|usring nested reshape       |[4.0 only] using nested
                   |functions gives runtime     |reshape functions gives
                   |error                       |runtime error
   Target Milestone|---                         |4.0.1


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


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

* [Bug libfortran/20436] [4.0 only] using nested reshape functions gives runtime error
  2005-03-12  6:23 [Bug fortran/20436] New: usring nested reshape functions gives runtime error kamaraju at gmail dot com
                   ` (2 preceding siblings ...)
  2005-04-27 10:18 ` [Bug libfortran/20436] [4.0 only] using " tkoenig at gcc dot gnu dot org
@ 2005-05-21 19:57 ` cvs-commit at gcc dot gnu dot org
  2005-05-21 20:31 ` tkoenig at gcc dot gnu dot org
  2005-07-30 22:29 ` cvs-commit at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-21 19:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-05-21 19:57 -------
Subject: Bug 20436

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	tkoenig@gcc.gnu.org	2005-05-21 19:56:44

Modified files:
	libgfortran/generated: reshape_c4.c reshape_c8.c reshape_i4.c 
	                       reshape_i8.c 
	libgfortran/intrinsics: reshape_generic.c 
	libgfortran/m4 : reshape.m4 
	libgfortran    : ChangeLog 
	gcc/testsuite  : ChangeLog 

Log message:
	005-05-21  Thomas Koenig  <Thomas.Koenig@online.de>
	
	PR libfortran/20074
	PR libfortran/20436
	PR libfortran/21108
	* m4/reshape.m4 (reshape_`'rtype_kind):  rs, rex:  New
	variables, to be used in calculation of return array sizes.
	Populate return array descriptor if ret->data is NULL.
	Fix condition for early return (it used to test something
	undefined if order was used).
	Remove duplicate check wether pad is used.
	* intrinsics/reshape_generic.c (reshape_generic): Likewise.
	Fix a few places where the wrong variables were set.
	* generated/reshape_i4.c: Regenerated.
	* generated/reshape_i8.c: Regenerated.
	
	2005-05-21  Thomas Koenig  <Thomas.Koenig@online.de>
	
	PR libfortran/20074
	PR libfortran/20436
	PR libfortran/21108
	* gfortran.dg/nested_reshape.f90: new test
	* gfortran.dg/reshape-alloc.f90: new test
	* gfortran.dg/reshape.f90: new test

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/generated/reshape_c4.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1.2.1&r2=1.1.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/generated/reshape_c8.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1.2.1&r2=1.1.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/generated/reshape_i4.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5&r2=1.5.12.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/generated/reshape_i8.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5&r2=1.5.12.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/intrinsics/reshape_generic.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.6&r2=1.6.12.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/m4/reshape.m4.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.6.12.1&r2=1.6.12.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.163.2.35&r2=1.163.2.36
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.192&r2=1.5084.2.193



-- 


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


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

* [Bug libfortran/20436] [4.0 only] using nested reshape functions gives runtime error
  2005-03-12  6:23 [Bug fortran/20436] New: usring nested reshape functions gives runtime error kamaraju at gmail dot com
                   ` (3 preceding siblings ...)
  2005-05-21 19:57 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-21 20:31 ` tkoenig at gcc dot gnu dot org
  2005-07-30 22:29 ` cvs-commit at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-05-21 20:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tkoenig at gcc dot gnu dot org  2005-05-21 20:31 -------
Fixed in 4.0.

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


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


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

* [Bug libfortran/20436] [4.0 only] using nested reshape functions gives runtime error
  2005-03-12  6:23 [Bug fortran/20436] New: usring nested reshape functions gives runtime error kamaraju at gmail dot com
                   ` (4 preceding siblings ...)
  2005-05-21 20:31 ` tkoenig at gcc dot gnu dot org
@ 2005-07-30 22:29 ` cvs-commit at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-07-30 22:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-07-30 22:29 -------
Subject: Bug 20436

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	tkoenig@gcc.gnu.org	2005-07-30 22:29:25

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.dg: nested_reshape.f90 reshape-alloc.f90 
	                           reshape.f90 

Log message:
	2005-07-30  Thomas Koenig  <Thomas.Koenig@online.de>
	
	Backport from mainline:
	PR libfortran/20074
	PR libfortran/20436
	PR libfortran/21108
	* gfortran.dg/nested_reshape.f90:  Actually commit.
	* gfortran.dg/reshape-alloc.f90:  Actually commit.
	* gfortran.dg/reshape.f90:  Actually commit.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.311&r2=1.5084.2.312
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/nested_reshape.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.14.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/reshape-alloc.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.14.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/reshape.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.14.1



-- 


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


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

end of thread, other threads:[~2005-07-30 22:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-12  6:23 [Bug fortran/20436] New: usring nested reshape functions gives runtime error kamaraju at gmail dot com
2005-03-12 18:02 ` [Bug libfortran/20436] " pinskia at gcc dot gnu dot org
2005-04-22 20:03 ` cvs-commit at gcc dot gnu dot org
2005-04-27 10:18 ` [Bug libfortran/20436] [4.0 only] using " tkoenig at gcc dot gnu dot org
2005-05-21 19:57 ` cvs-commit at gcc dot gnu dot org
2005-05-21 20:31 ` tkoenig at gcc dot gnu dot org
2005-07-30 22:29 ` cvs-commit 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).