public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31919]  New: ICE in fold_binary in fold-const.c
@ 2007-05-14 14:55 keinstein_junior at gmx dot net
  2007-05-14 15:40 ` [Bug fortran/31919] " dfranke at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: keinstein_junior at gmx dot net @ 2007-05-14 14:55 UTC (permalink / raw)
  To: gcc-bugs

On amd64 debian gfortran fails (both trunk and recent 4.2 from GFortran wiki):

module materials
   implicit none
   integer,parameter :: dr = kind(1.0d0)
   private
   type md_field
       real(dr),dimension(1:3,1:99) :: realspeed
       real(dr),dimension(1:99) :: mass,kinenergy
   end type md_field
contains


   function getTemperature(x,selector) result(temp)
      type(md_field),intent(in) :: x;
      integer,dimension(:),intent(in),optional :: selector;
      real(kind=dr) :: temp;

! realspeed has wrong dimensions
      print *,min(x % kinenergy,x % realspeed)

   end function getTemperature
end module materials


Output is:
$ gfortran-trunk matbug.F90
matbug.F90: In function ‘gettemperature’:
matbug.F90:12: internal compiler error: in fold_binary, at fold-const.c:8923
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

It's not valid I guess, but gfortran should not fail.


-- 
           Summary: ICE in fold_binary in fold-const.c
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: keinstein_junior at gmx dot net


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


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

* [Bug fortran/31919] ICE in fold_binary in fold-const.c
  2007-05-14 14:55 [Bug fortran/31919] New: ICE in fold_binary in fold-const.c keinstein_junior at gmx dot net
@ 2007-05-14 15:40 ` dfranke at gcc dot gnu dot org
  2007-05-14 15:41 ` dfranke at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-05-14 15:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dfranke at gcc dot gnu dot org  2007-05-14 16:39 -------
The problem is the handling of arrays in the MIN intrinsic. The reporter
probably wanted "MIN(MINVAL(x%kinenergy), MINVAL(x%realspeed))" as the
dimensions of REALSPEED and KINENERGY are not conformable.

$> sunf95 pr31919.f90
"pr31919.f90", Line = 10, Column = 35: ERROR: All of the actual arguments to
this intrinsic call are not conformable to each other.

Slightly reduced testcase:

$> cat pr31919.f90
module materials
   type md_field
       real,dimension(10, 10) :: realspeed
       real,dimension(10) :: mass,kinenergy
   end type md_field
contains
   real function getTemperature(x)
      type(md_field),intent(in) :: x;
      print *, min(x%kinenergy, x%realspeed)
   end function getTemperature
end module materials


(gdb) bt
#0  integer_zerop (expr=0x0) at ../../../svn/gcc/gcc/tree.c:1295
#1  0x080b7b66 in gfc_conv_array_index_offset (se=0xbfc63db4, info=0x887d540,
dim=1, i=1, ar=0x887d2bc,
    stride=0xb7cb9540) at ../../../svn/gcc/gcc/fortran/trans-array.c:2145
#2  0x080b7faa in gfc_trans_preloop_setup (loop=0xbfc63e3c, dim=0, flag=1,
pblock=0xbfc63ec8)
    at ../../../svn/gcc/gcc/fortran/trans-array.c:2365
#3  0x080b82fb in gfc_start_scalarized_body (loop=0xbfc63e3c, pbody=0xbfc63f4c)
    at ../../../svn/gcc/gcc/fortran/trans-array.c:2406
#4  0x080dd7cf in gfc_trans_transfer (code=0x8842510) at
../../../svn/gcc/gcc/fortran/trans-io.c:1854
#5  0x080b2cf5 in gfc_trans_code (code=0x8842510) at
../../../svn/gcc/gcc/fortran/trans.c:605
#6  0x080dfeb3 in build_dt (function=0xb7cb4580, code=0x887d408) at
../../../svn/gcc/gcc/fortran/trans-io.c:1507
#7  0x080b2d17 in gfc_trans_code (code=0x887d408) at
../../../svn/gcc/gcc/fortran/trans.c:581
#8  0x080c8973 in gfc_generate_function_code (ns=0x887c600) at
../../../svn/gcc/gcc/fortran/trans-decl.c:3181
#9  0x080b1cb8 in gfc_generate_module_code (ns=0x88421b0) at
../../../svn/gcc/gcc/fortran/trans.c:693
#10 0x0808d63e in gfc_parse_file () at
../../../svn/gcc/gcc/fortran/parse.c:3259
#11 0x080ad70d in gfc_be_parse_file (set_yydebug=0) at
../../../svn/gcc/gcc/fortran/f95-lang.c:305
#12 0x082fc538 in toplev_main (argc=2, argv=0xbfc64284) at
../../../svn/gcc/gcc/toplev.c:1051
#13 0x080f063f in main (argc=Cannot access memory at address 0x1
) at ../../../svn/gcc/gcc/main.c:35

$> gfortran-svn -v
gcc version 4.3.0 20070502 (experimental)


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-invalid-code
      Known to fail|                            |4.1.2 4.2.0 4.3.0
   Last reconfirmed|0000-00-00 00:00:00         |2007-05-14 16:39:55
               date|                            |


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


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

* [Bug fortran/31919] ICE in fold_binary in fold-const.c
  2007-05-14 14:55 [Bug fortran/31919] New: ICE in fold_binary in fold-const.c keinstein_junior at gmx dot net
  2007-05-14 15:40 ` [Bug fortran/31919] " dfranke at gcc dot gnu dot org
@ 2007-05-14 15:41 ` dfranke at gcc dot gnu dot org
  2007-05-14 16:56 ` dfranke at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-05-14 15:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dfranke at gcc dot gnu dot org  2007-05-14 16:41 -------
Minimal testcase:

$> cat pr31919.f90
INTEGER :: a(2), b(2,2)
PRINT *, MIN(a, b)
END


-- 


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


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

* [Bug fortran/31919] ICE in fold_binary in fold-const.c
  2007-05-14 14:55 [Bug fortran/31919] New: ICE in fold_binary in fold-const.c keinstein_junior at gmx dot net
  2007-05-14 15:40 ` [Bug fortran/31919] " dfranke at gcc dot gnu dot org
  2007-05-14 15:41 ` dfranke at gcc dot gnu dot org
@ 2007-05-14 16:56 ` dfranke at gcc dot gnu dot org
  2007-05-14 17:31 ` patchapp at dberlin dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-05-14 16:56 UTC (permalink / raw)
  To: gcc-bugs



-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |dfranke at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-05-14 16:39:55         |2007-05-14 17:55:58
               date|                            |


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


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

* [Bug fortran/31919] ICE in fold_binary in fold-const.c
  2007-05-14 14:55 [Bug fortran/31919] New: ICE in fold_binary in fold-const.c keinstein_junior at gmx dot net
                   ` (2 preceding siblings ...)
  2007-05-14 16:56 ` dfranke at gcc dot gnu dot org
@ 2007-05-14 17:31 ` patchapp at dberlin dot org
  2007-05-15 20:05 ` patchapp at dberlin dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: patchapp at dberlin dot org @ 2007-05-14 17:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from patchapp at dberlin dot org  2007-05-14 18:30 -------
Subject: Bug number PR31919

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-05/msg00890.html


-- 


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


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

* [Bug fortran/31919] ICE in fold_binary in fold-const.c
  2007-05-14 14:55 [Bug fortran/31919] New: ICE in fold_binary in fold-const.c keinstein_junior at gmx dot net
                   ` (3 preceding siblings ...)
  2007-05-14 17:31 ` patchapp at dberlin dot org
@ 2007-05-15 20:05 ` patchapp at dberlin dot org
  2007-05-17 12:38 ` dfranke at gcc dot gnu dot org
  2007-06-16 22:53 ` [Bug fortran/31919] [4.1/4.2 only] min/max do not check array conformance dfranke at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: patchapp at dberlin dot org @ 2007-05-15 20:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from patchapp at dberlin dot org  2007-05-15 21:05 -------
Subject: Bug number PR31919

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-05/msg01003.html


-- 


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


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

* [Bug fortran/31919] ICE in fold_binary in fold-const.c
  2007-05-14 14:55 [Bug fortran/31919] New: ICE in fold_binary in fold-const.c keinstein_junior at gmx dot net
                   ` (4 preceding siblings ...)
  2007-05-15 20:05 ` patchapp at dberlin dot org
@ 2007-05-17 12:38 ` dfranke at gcc dot gnu dot org
  2007-06-16 22:53 ` [Bug fortran/31919] [4.1/4.2 only] min/max do not check array conformance dfranke at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-05-17 12:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dfranke at gcc dot gnu dot org  2007-05-17 13:37 -------
Subject: Bug 31919

Author: dfranke
Date: Thu May 17 12:37:24 2007
New Revision: 124794

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124794
Log:
gcc/fortran:
2007-05-15  Daniel Franke  <franke.daniel@gmail.com>

        PR fortran/31919
        PR fortran/31929
        PR fortran/31930
        * intrinsic.c (check_specific): Check elemental intrinsics for
        rank and shape.
        (add_functions): Fixed dummy argument names of BESJN and BESYN.
        Fixed elemental status of MCLOCK and MCLOCK8.
        * check.c (check_rest): Added check for array conformance.
        (gfc_check_merge): Removed check for array conformance.
        (gfc_check_besn): Removed check for scalarity.
        * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
        (BESJN, BESYN): Clarified documentation.

gcc/testsuite:
2007-05-17  Daniel Franke <franke.daniel@gmail.com>

        PR fortran/31919
        * gfortran.dg/min_max_conformance.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/min_max_conformance.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.texi
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/31919] [4.1/4.2 only] min/max do not check array conformance
  2007-05-14 14:55 [Bug fortran/31919] New: ICE in fold_binary in fold-const.c keinstein_junior at gmx dot net
                   ` (5 preceding siblings ...)
  2007-05-17 12:38 ` dfranke at gcc dot gnu dot org
@ 2007-06-16 22:53 ` dfranke at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-06-16 22:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dfranke at gcc dot gnu dot org  2007-06-16 22:53 -------
Not a regression, no backport to 4.2. Closing.


-- 

dfranke at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2007-06-16 22:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-14 14:55 [Bug fortran/31919] New: ICE in fold_binary in fold-const.c keinstein_junior at gmx dot net
2007-05-14 15:40 ` [Bug fortran/31919] " dfranke at gcc dot gnu dot org
2007-05-14 15:41 ` dfranke at gcc dot gnu dot org
2007-05-14 16:56 ` dfranke at gcc dot gnu dot org
2007-05-14 17:31 ` patchapp at dberlin dot org
2007-05-15 20:05 ` patchapp at dberlin dot org
2007-05-17 12:38 ` dfranke at gcc dot gnu dot org
2007-06-16 22:53 ` [Bug fortran/31919] [4.1/4.2 only] min/max do not check array conformance dfranke 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).