public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/44347]  New: gfortran segmentation violation in gfc_conv_scalarized_array_ref
@ 2010-05-31 16:19 zeccav at gmail dot com
  2010-05-31 17:14 ` [Bug fortran/44347] " mikael at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: zeccav at gmail dot com @ 2010-05-31 16:19 UTC (permalink / raw)
  To: gcc-bugs

The following provokes the summary:

      dimension ip(1),ir(1)
      print *,selected_real_kind(ip,i)
      print *,selected_real_kind(i,ir)
      end

Best regards
Vittorio Zecca


-- 
           Summary: gfortran segmentation violation in
                    gfc_conv_scalarized_array_ref
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zeccav at gmail dot com
  GCC host triplet: x86_64-unknown-linux-gnu


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


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

* [Bug fortran/44347] gfortran segmentation violation in gfc_conv_scalarized_array_ref
  2010-05-31 16:19 [Bug fortran/44347] New: gfortran segmentation violation in gfc_conv_scalarized_array_ref zeccav at gmail dot com
@ 2010-05-31 17:14 ` mikael at gcc dot gnu dot org
  2010-05-31 17:56 ` dominiq at lps dot ens dot fr
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mikael at gcc dot gnu dot org @ 2010-05-31 17:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from mikael at gcc dot gnu dot org  2010-05-31 17:14 -------
Works with trunk.


-- 

mikael at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.4.4
      Known to work|                            |4.6.0
         Resolution|                            |FIXED


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


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

* [Bug fortran/44347] gfortran segmentation violation in gfc_conv_scalarized_array_ref
  2010-05-31 16:19 [Bug fortran/44347] New: gfortran segmentation violation in gfc_conv_scalarized_array_ref zeccav at gmail dot com
  2010-05-31 17:14 ` [Bug fortran/44347] " mikael at gcc dot gnu dot org
@ 2010-05-31 17:56 ` dominiq at lps dot ens dot fr
  2010-05-31 18:11 ` mikael at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-05-31 17:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dominiq at lps dot ens dot fr  2010-05-31 17:56 -------
I think the code is invalid:

(1) i, ip, ir  are used unitialized;
(2) the arguments of selected_real_kind should be scalar integer.

So this pr is probably ICE-on-invalid for 4.4 and 4.5(?) and accept invalid for
4.6.


-- 


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


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

* [Bug fortran/44347] gfortran segmentation violation in gfc_conv_scalarized_array_ref
  2010-05-31 16:19 [Bug fortran/44347] New: gfortran segmentation violation in gfc_conv_scalarized_array_ref zeccav at gmail dot com
  2010-05-31 17:14 ` [Bug fortran/44347] " mikael at gcc dot gnu dot org
  2010-05-31 17:56 ` dominiq at lps dot ens dot fr
@ 2010-05-31 18:11 ` mikael at gcc dot gnu dot org
  2010-06-01  7:53 ` [Bug fortran/44347] SELECT_REAL_KIND: Wrongly accepts non-scalar arguments burnus at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mikael at gcc dot gnu dot org @ 2010-05-31 18:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from mikael at gcc dot gnu dot org  2010-05-31 18:10 -------
(In reply to comment #2)
> I think the code is invalid:
> 
> (1) i, ip, ir  are used unitialized;
> (2) the arguments of selected_real_kind should be scalar integer.
> 
> So this pr is probably ICE-on-invalid for 4.4 and 4.5(?) and accept invalid for
> 4.6.
> 
The problem was really on the segmentation violation I think. 
One can reopen to track the absence of errors for (1) and (2). 
I leave this up to you (or others). 


-- 


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


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

* [Bug fortran/44347] SELECT_REAL_KIND: Wrongly accepts non-scalar arguments
  2010-05-31 16:19 [Bug fortran/44347] New: gfortran segmentation violation in gfc_conv_scalarized_array_ref zeccav at gmail dot com
                   ` (2 preceding siblings ...)
  2010-05-31 18:11 ` mikael at gcc dot gnu dot org
@ 2010-06-01  7:53 ` burnus at gcc dot gnu dot org
  2010-06-09 20:12 ` dfranke at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-06-01  7:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from burnus at gcc dot gnu dot org  2010-06-01 07:53 -------
REOPEN to address the issue pointed out by Dominique in comment 1:

> (2) the arguments of selected_real_kind should be scalar integer.

s/ should / shall /:

P (optional) shall be an integer scalar.
R (optional) shall be an integer scalar.
RADIX (optional) shall be an integer scalar.

That's currently not diagnosed while g95, NAG, ifort, openf95, and pathf95
print an ERROR.

 * * *

I changed the summary. Vittorio, it helps to repeat the issue in the bug
description as the summary can be changed. For completeness, the original issue
was that GCC 4.4 and 4.5 had an ICE:
  test.f90:5:0: internal compiler error: Segmentation fault
or
  gfortran segmentation violation in gfc_conv_scalarized_array_ref
as the initial summary was.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
           Keywords|ice-on-valid-code           |accepts-invalid
      Known to fail|4.4.4                       |
      Known to work|4.6.0                       |
         Resolution|FIXED                       |
            Summary|gfortran segmentation       |SELECT_REAL_KIND: Wrongly
                   |violation in                |accepts non-scalar arguments
                   |gfc_conv_scalarized_array_re|
                   |f                           |


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


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

* [Bug fortran/44347] SELECT_REAL_KIND: Wrongly accepts non-scalar arguments
  2010-05-31 16:19 [Bug fortran/44347] New: gfortran segmentation violation in gfc_conv_scalarized_array_ref zeccav at gmail dot com
                   ` (3 preceding siblings ...)
  2010-06-01  7:53 ` [Bug fortran/44347] SELECT_REAL_KIND: Wrongly accepts non-scalar arguments burnus at gcc dot gnu dot org
@ 2010-06-09 20:12 ` dfranke at gcc dot gnu dot org
  2010-06-09 21:36 ` dfranke at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-06-09 20:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dfranke at gcc dot gnu dot org  2010-06-09 20:11 -------
Confirmed.


-- 

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|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   GCC host triplet|x86_64-unknown-linux-gnu    |
   Last reconfirmed|0000-00-00 00:00:00         |2010-06-09 20:11:45
               date|                            |


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


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

* [Bug fortran/44347] SELECT_REAL_KIND: Wrongly accepts non-scalar arguments
  2010-05-31 16:19 [Bug fortran/44347] New: gfortran segmentation violation in gfc_conv_scalarized_array_ref zeccav at gmail dot com
                   ` (4 preceding siblings ...)
  2010-06-09 20:12 ` dfranke at gcc dot gnu dot org
@ 2010-06-09 21:36 ` dfranke at gcc dot gnu dot org
  2010-06-12 11:21 ` dfranke at gcc dot gnu dot org
  2010-06-12 11:22 ` dfranke at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-06-09 21:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dfranke at gcc dot gnu dot org  2010-06-09 21:36 -------
Subject: Bug 44347

Author: dfranke
Date: Wed Jun  9 21:36:33 2010
New Revision: 160506

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160506
Log:
gcc/fortran/:
2010-06-09  Daniel Franke  <franke.daniel@gmail.com>

        PR fortran/44347
        * check.c (gfc_check_selected_real_kind): Verify that the
        actual arguments are scalar.

gcc/testsuite/:
2010-06-09  Daniel Franke  <franke.daniel@gmail.com>

        PR fortran/44347
        * gfortran.dg/selected_real_kind_1.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/selected_real_kind_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/44347] SELECT_REAL_KIND: Wrongly accepts non-scalar arguments
  2010-05-31 16:19 [Bug fortran/44347] New: gfortran segmentation violation in gfc_conv_scalarized_array_ref zeccav at gmail dot com
                   ` (5 preceding siblings ...)
  2010-06-09 21:36 ` dfranke at gcc dot gnu dot org
@ 2010-06-12 11:21 ` dfranke at gcc dot gnu dot org
  2010-06-12 11:22 ` dfranke at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-06-12 11:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dfranke at gcc dot gnu dot org  2010-06-12 11:21 -------
Subject: Bug 44347

Author: dfranke
Date: Sat Jun 12 11:21:17 2010
New Revision: 160658

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160658
Log:
gcc/fortran/:
2010-06-12  Daniel Franke  <franke.daniel@gmail.com>

        PR fortran/44347
        * check.c (gfc_check_selected_real_kind): Verify that the
        actual arguments are scalar.

gcc/testsuite/:
2010-06-12  Daniel Franke  <franke.daniel@gmail.com>

        PR fortran/44347
        * gfortran.dg/selected_real_kind_1.f90: New.


Added:
    branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/selected_real_kind_1.f90
Modified:
    branches/gcc-4_5-branch/gcc/fortran/ChangeLog
    branches/gcc-4_5-branch/gcc/fortran/check.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/44347] SELECT_REAL_KIND: Wrongly accepts non-scalar arguments
  2010-05-31 16:19 [Bug fortran/44347] New: gfortran segmentation violation in gfc_conv_scalarized_array_ref zeccav at gmail dot com
                   ` (6 preceding siblings ...)
  2010-06-12 11:21 ` dfranke at gcc dot gnu dot org
@ 2010-06-12 11:22 ` dfranke at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-06-12 11:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dfranke at gcc dot gnu dot org  2010-06-12 11:22 -------
Fixed in trunk and 4.5. Closing.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.5.1


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


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

end of thread, other threads:[~2010-06-12 11:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-31 16:19 [Bug fortran/44347] New: gfortran segmentation violation in gfc_conv_scalarized_array_ref zeccav at gmail dot com
2010-05-31 17:14 ` [Bug fortran/44347] " mikael at gcc dot gnu dot org
2010-05-31 17:56 ` dominiq at lps dot ens dot fr
2010-05-31 18:11 ` mikael at gcc dot gnu dot org
2010-06-01  7:53 ` [Bug fortran/44347] SELECT_REAL_KIND: Wrongly accepts non-scalar arguments burnus at gcc dot gnu dot org
2010-06-09 20:12 ` dfranke at gcc dot gnu dot org
2010-06-09 21:36 ` dfranke at gcc dot gnu dot org
2010-06-12 11:21 ` dfranke at gcc dot gnu dot org
2010-06-12 11:22 ` 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).