public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31253]  New: ICE in gfc_conv_constant, at fortran/trans-const.c:348
@ 2007-03-17 21:57 mikael dot morin at tele2 dot fr
  2007-03-17 21:59 ` [Bug fortran/31253] " mikael dot morin at tele2 dot fr
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: mikael dot morin at tele2 dot fr @ 2007-03-17 21:57 UTC (permalink / raw)
  To: gcc-bugs

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

the fortran compiler crashes when trying to compile the following test program
: 

      subroutine probleme(p)


      real(kind=8), dimension(:) :: p

      integer :: nx = size(p, 1)
      integer :: nix

      nix = nx

      end subroutine




The error reported by the compiler is :

test.f: In function ‘probleme’:
test.f:2: erreur interne du compilateur: dans gfc_conv_constant, à
fortran/trans-const.c:348
Veuillez soumettre un rapport complet d'anomalies,
avec le source pré-traité si nécessaire.
Consultez <URL:http://gcc.gnu.org/bugs.html> pour plus de détail.


The compilation command was : gfortran test.f


The gfortran -v is :

Lecture des spécification à partir de
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/specs
Target: x86_64-pc-linux-gnu
Configuré avec: /usr/src/gcc-4.1.2/configure --host=x86_64-pc-linux-gnu
--prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man
--enable-threads=posix --with-system-zlib --enable-languages=f95
--disable-multilib
Modèle de thread: posix
version gcc 4.1.2


-- 
           Summary: ICE in gfc_conv_constant, at fortran/trans-const.c:348
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mikael dot morin at tele2 dot fr
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


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


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

* [Bug fortran/31253] ICE in gfc_conv_constant, at fortran/trans-const.c:348
  2007-03-17 21:57 [Bug fortran/31253] New: ICE in gfc_conv_constant, at fortran/trans-const.c:348 mikael dot morin at tele2 dot fr
@ 2007-03-17 21:59 ` mikael dot morin at tele2 dot fr
  2007-03-17 22:03 ` mikael dot morin at tele2 dot fr
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mikael dot morin at tele2 dot fr @ 2007-03-17 21:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from mikael dot morin at tele2 dot fr  2007-03-17 21:58 -------
Created an attachment (id=13223)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13223&action=view)
the test program that fails


-- 


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


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

* [Bug fortran/31253] ICE in gfc_conv_constant, at fortran/trans-const.c:348
  2007-03-17 21:57 [Bug fortran/31253] New: ICE in gfc_conv_constant, at fortran/trans-const.c:348 mikael dot morin at tele2 dot fr
  2007-03-17 21:59 ` [Bug fortran/31253] " mikael dot morin at tele2 dot fr
@ 2007-03-17 22:03 ` mikael dot morin at tele2 dot fr
  2007-03-17 22:08 ` tkoenig at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mikael dot morin at tele2 dot fr @ 2007-03-17 22:03 UTC (permalink / raw)
  To: gcc-bugs

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



------- Comment #2 from mikael dot morin at tele2 dot fr  2007-03-17 22:03 -------
the attached program (test.f) fails to compile: 

the compilation command is :
gfortran -c test.f

the error is :
test.f: In function ‘probleme’:
test.f:2: erreur interne du compilateur: dans gfc_conv_constant, à
fortran/trans-const.c:348
Veuillez soumettre un rapport complet d'anomalies,
avec le source pré-traité si nécessaire.
Consultez <URL:http://gcc.gnu.org/bugs.html> pour plus de détail.

the fortran version is (gfortran -v) :
Lecture des spécification à partir de
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/specs
Target: x86_64-pc-linux-gnu
Configuré avec: /usr/src/gcc-4.1.2/configure --host=x86_64-pc-linux-gnu
--prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man
--enable-threads=posix --with-system-zlib --enable-languages=f95
--disable-multilib
Modèle de thread: posix
version gcc 4.1.2


-- 

mikael dot morin at tele2 dot fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikael dot morin at tele2
                   |                            |dot fr
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.1.1 4.1.2


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


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

* [Bug fortran/31253] ICE in gfc_conv_constant, at fortran/trans-const.c:348
  2007-03-17 21:57 [Bug fortran/31253] New: ICE in gfc_conv_constant, at fortran/trans-const.c:348 mikael dot morin at tele2 dot fr
  2007-03-17 21:59 ` [Bug fortran/31253] " mikael dot morin at tele2 dot fr
  2007-03-17 22:03 ` mikael dot morin at tele2 dot fr
@ 2007-03-17 22:08 ` tkoenig at gcc dot gnu dot org
  2007-03-17 22:10 ` tkoenig at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2007-03-17 22:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from tkoenig at gcc dot gnu dot org  2007-03-17 22:08 -------
Confirmed with 4.3.0.


-- 

tkoenig 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         |2007-03-17 22:08:39
               date|                            |


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


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

* [Bug fortran/31253] ICE in gfc_conv_constant, at fortran/trans-const.c:348
  2007-03-17 21:57 [Bug fortran/31253] New: ICE in gfc_conv_constant, at fortran/trans-const.c:348 mikael dot morin at tele2 dot fr
                   ` (2 preceding siblings ...)
  2007-03-17 22:08 ` tkoenig at gcc dot gnu dot org
@ 2007-03-17 22:10 ` tkoenig at gcc dot gnu dot org
  2007-03-18 11:58 ` mikael dot morin at tele2 dot fr
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2007-03-17 22:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from tkoenig at gcc dot gnu dot org  2007-03-17 22:10 -------
*** Bug 31252 has been marked as a duplicate of this bug. ***


-- 


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


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

* [Bug fortran/31253] ICE in gfc_conv_constant, at fortran/trans-const.c:348
  2007-03-17 21:57 [Bug fortran/31253] New: ICE in gfc_conv_constant, at fortran/trans-const.c:348 mikael dot morin at tele2 dot fr
                   ` (3 preceding siblings ...)
  2007-03-17 22:10 ` tkoenig at gcc dot gnu dot org
@ 2007-03-18 11:58 ` mikael dot morin at tele2 dot fr
  2007-03-20 23:51 ` fxcoudert at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mikael dot morin at tele2 dot fr @ 2007-03-18 11:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mikael dot morin at tele2 dot fr  2007-03-18 11:58 -------
Created an attachment (id=13225)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13225&action=view)
a test program that does not fail


-- 


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


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

* [Bug fortran/31253] ICE in gfc_conv_constant, at fortran/trans-const.c:348
  2007-03-17 21:57 [Bug fortran/31253] New: ICE in gfc_conv_constant, at fortran/trans-const.c:348 mikael dot morin at tele2 dot fr
                   ` (4 preceding siblings ...)
  2007-03-18 11:58 ` mikael dot morin at tele2 dot fr
@ 2007-03-20 23:51 ` fxcoudert at gcc dot gnu dot org
  2007-07-22 16:31 ` dfranke at gcc dot gnu dot org
  2007-07-22 16:43 ` dfranke at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-03-20 23:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from fxcoudert at gcc dot gnu dot org  2007-03-20 23:51 -------
I think test.f is not valid Fortran, because size(p,1) is not a valid
specification expression. See 7.1.6 of the F2003 standard: it is a array
inquiry function (size) with an argument that is a variable (p) whose
properties inquired about *are dependent* on the upper bound of the last
dimension of an assumed-size array. So, it's invalid.

Now, we actually accept it because SIZE is a specification inquiry, and we
don't check things any further. This part (check_inquiry and its callers in
expr.c) need some rewriting to go along with the standard.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
           Severity|major                       |normal
  GCC build triplet|x86_64-linux-gnu            |
   GCC host triplet|x86_64-linux-gnu            |
 GCC target triplet|x86_64-linux-gnu            |
           Keywords|ice-on-valid-code           |accepts-invalid, ice-on-
                   |                            |invalid-code
      Known to fail|4.1.1 4.1.2                 |4.1.1 4.1.2 4.2.0 4.3.0
   Last reconfirmed|2007-03-17 22:08:39         |2007-03-20 23:51:36
               date|                            |


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


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

* [Bug fortran/31253] ICE in gfc_conv_constant, at fortran/trans-const.c:348
  2007-03-17 21:57 [Bug fortran/31253] New: ICE in gfc_conv_constant, at fortran/trans-const.c:348 mikael dot morin at tele2 dot fr
                   ` (5 preceding siblings ...)
  2007-03-20 23:51 ` fxcoudert at gcc dot gnu dot org
@ 2007-07-22 16:31 ` dfranke at gcc dot gnu dot org
  2007-07-22 16:43 ` dfranke at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-07-22 16:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dfranke at gcc dot gnu dot org  2007-07-22 16:31 -------
Subject: Bug 31253

Author: dfranke
Date: Sun Jul 22 16:31:11 2007
New Revision: 126826

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

        PR fortran/29962
        PR fortran/31253
        PR fortran/31265
        PR fortran/31639
        * gfortran.h (gfc_intrinsic_sym): Changed members elemental, pure,
        generic, specific, actual_ok, noreturn into bits of a bitfield, 
        added bits for inquiry, transformational, conversion.
        * check.c (non_init_transformational): Removed, removed all callers.
        * intrinsic.c (enum class): New.
        (add_sym*): Replaced argument elemetal by enum class. Changed all
        callers.
        (add_functions): Assign appropriate classes to intrinsic functions.
        (add_subroutines): Assign appropriate classes to intrinsic subroutines.
        (add_conv): Set conversion attribute.
        (gfc_init_expr_extensions): Removed, removed all callers.
        (gfc_intrinsic_func_interface): Reimplemented check for non-standard
        initializatione expressions.
        * expr.c (check_specification_function): New.
        (gfc_is_constant_expr): Added check for specification functions.
        (check_init_expr_arguments): New.
        (check_inquiry): Changed return value to MATCH, added checks for
        inquiry functions defined by F2003.
        (check_transformational): New.
        (check_null): New.
        (check_elemental): New.
        (check_conversion): New.
        (check_init_expr): Call new check functions, add more specific error
        messages.

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

        PR fortran/29962
        * gfortran.dg/array_initializer_1.f90: Removed warning.
        * gfortran.dg/initialization_1.f90: Adjusted messages.
        * gfortran.dg/nested_modules_6.f90: Removed warning.

        PR fortran/31253
        * gfortran.dg/initialization_7.f90: New test.

        PR fortran/31639
        * gfortran.dg/initialization_8.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/initialization_7.f90
    trunk/gcc/testsuite/gfortran.dg/initialization_8.f90
Modified:
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/expr.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/testsuite/gfortran.dg/array_initializer_1.f90
    trunk/gcc/testsuite/gfortran.dg/initialization_1.f90
    trunk/gcc/testsuite/gfortran.dg/nested_modules_6.f90


-- 


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


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

* [Bug fortran/31253] ICE in gfc_conv_constant, at fortran/trans-const.c:348
  2007-03-17 21:57 [Bug fortran/31253] New: ICE in gfc_conv_constant, at fortran/trans-const.c:348 mikael dot morin at tele2 dot fr
                   ` (6 preceding siblings ...)
  2007-07-22 16:31 ` dfranke at gcc dot gnu dot org
@ 2007-07-22 16:43 ` dfranke at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-07-22 16:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dfranke at gcc dot gnu dot org  2007-07-22 16:42 -------
Fixed in trunk. Closing.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org
             Status|NEW                         |RESOLVED
      Known to fail|4.1.1 4.1.2 4.2.0 4.3.0     |4.1.1 4.1.2 4.2.0
      Known to work|                            |4.3.0
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


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


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

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

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-17 21:57 [Bug fortran/31253] New: ICE in gfc_conv_constant, at fortran/trans-const.c:348 mikael dot morin at tele2 dot fr
2007-03-17 21:59 ` [Bug fortran/31253] " mikael dot morin at tele2 dot fr
2007-03-17 22:03 ` mikael dot morin at tele2 dot fr
2007-03-17 22:08 ` tkoenig at gcc dot gnu dot org
2007-03-17 22:10 ` tkoenig at gcc dot gnu dot org
2007-03-18 11:58 ` mikael dot morin at tele2 dot fr
2007-03-20 23:51 ` fxcoudert at gcc dot gnu dot org
2007-07-22 16:31 ` dfranke at gcc dot gnu dot org
2007-07-22 16:43 ` 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).