public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pault at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/20838] ICE in gfc_conv_expr_descriptor, at fortran/trans-array.c:3606
Date: Sun, 06 Nov 2005 20:05:00 -0000	[thread overview]
Message-ID: <20051106200520.15381.qmail@sourceware.org> (raw)
In-Reply-To: <bug-20838-6642@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from pault at gcc dot gnu dot org  2005-11-06 20:05 -------
Subject: Bug 20838

Author: pault
Date: Sun Nov  6 20:05:12 2005
New Revision: 106567

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106567
Log:
2005-11-06  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/24534
        * resolve.c (resolve_symbol): Exclude case of PRIVATE declared
        within derived type from error associated with PRIVATE type
        components within derived type.

        PR fortran/20838
        PR fortran/20840
        * gfortran.h: Add prototype for gfc_has_vector_index.
        * io.c (gfc_resolve_dt): Error if internal unit has a vector index.
        * expr.c (gfc_has_vector_index): New function to check if any of
        the array references of an expression have vector inidices.
        (gfc_check_pointer_assign): Error if internal unit has a vector index.

        PR fortran/17737
        * data.c (gfc_assign_data_value): Remove gcc_assert that caused the ICE
        and replace by a standard dependent warning/error if overwriting an
        existing initialization.
        * decl.c (gfc_data_variable): Remove old error for already initialized
        variable and the unused error check for common block variables.  Add
        error for hots associated variable and standard dependent error for
        common block variables, outside of blockdata.
        * symbol.c (check_conflict): Add constraints for DATA statement.

2005-11-06  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/24534
        gfortran.dg/private_type_2.f90: Modified to check that case with
        PRIVATE declaration within derived type is accepted.

        PR fortran/20838
        gfortran.dg/pointer_assign_1.f90: New test.

        PR fortran/20840
        * gfortran.dg/arrayio_0.f90: New test.

        PR fortran/17737
        gfortran.dg/data_initialized.f90: New test.
        gfortran.dg/data_constraints_1.f90: New test.
        gfortran.dg/data_constraints_2.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/arrayio_0.f90   (with props)
    trunk/gcc/testsuite/gfortran.dg/data_constraints_1.f90
    trunk/gcc/testsuite/gfortran.dg/data_constraints_2.f90
    trunk/gcc/testsuite/gfortran.dg/data_initialized.f90
    trunk/gcc/testsuite/gfortran.dg/pointer_assign_1.f90   (with props)
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/data.c
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/expr.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/io.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/private_type_2.f90

Added: trunk/gcc/testsuite/gfortran.dg/arrayio_0.f90
URL:
http://gcc.gnu.org/viewcvs/trunk/gcc/testsuite/gfortran.dg/arrayio_0.f90?root=gcc&view=auto&rev=106567
==============================================================================
--- trunk/gcc/testsuite/gfortran.dg/arrayio_0.f90 (added)
+++ trunk/gcc/testsuite/gfortran.dg/arrayio_0.f90 Sun Nov  6 20:05:12 2005
@@ -1,0 +1,19 @@
+! { dg-do compile }
+! Tests fix for PR20840 - would ICE with vector subscript in 
+! internal unit.
+!
+! Contributed by Paul Thomas  <pault@gcc.gnu.org>
+!
+  character(len=12), dimension(4) :: iu, buff
+  character(len=48), dimension(2) :: iue
+  equivalence (iu, iue)
+  integer, dimension(4) :: v = (/2,1,4,3/)
+  iu = (/"Vector","subscripts","not","allowed!"/)
+  read (iu, '(a12/)') buff
+  read (iue(1), '(4a12)') buff
+  read (iu(4:1:-1), '(a12/)') buff
+  read (iu(v), '(a12/)') buff           ! { dg-error "with vector subscript" }
+  read (iu((/2,4,3,1/)), '(a12/)') buff ! { dg-error "with vector subscript" }
+  print *, buff
+  end
+

Propchange: trunk/gcc/testsuite/gfortran.dg/arrayio_0.f90
            ('svn:executable' added)

Added: trunk/gcc/testsuite/gfortran.dg/pointer_assign_1.f90
URL:
http://gcc.gnu.org/viewcvs/trunk/gcc/testsuite/gfortran.dg/pointer_assign_1.f90?root=gcc&view=auto&rev=106567
==============================================================================
--- trunk/gcc/testsuite/gfortran.dg/pointer_assign_1.f90 (added)
+++ trunk/gcc/testsuite/gfortran.dg/pointer_assign_1.f90 Sun Nov  6 20:05:12
2005
@@ -1,0 +1,17 @@
+! { dg-do compile }
+! Tests fix for PR20838 - would ICE with vector subscript in 
+! pointer assignment.
+!
+! Contributed by Paul Thomas  <pault@gcc.gnu.org>
+!
+  integer, parameter, dimension(3) :: i = (/2,1,3/)
+  integer, dimension(3), target   :: tar
+  integer, dimension(2, 3), target   :: tar2
+  integer, dimension(:), pointer  :: ptr
+  ptr => tar
+  ptr => tar(3:1:-1)
+  ptr => tar(i)     ! { dg-error "with vector subscript" }
+  ptr => tar2(1, :)
+  ptr => tar2(2, i) ! { dg-error "with vector subscript" }
+  end
+

Propchange: trunk/gcc/testsuite/gfortran.dg/pointer_assign_1.f90
            ('svn:executable' added)


-- 


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


       reply	other threads:[~2005-11-06 20:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-20838-6642@http.gcc.gnu.org/bugzilla/>
2005-11-06 20:05 ` pault at gcc dot gnu dot org [this message]
2005-11-06 22:50 ` pault at gcc dot gnu dot org
2005-11-06 22:53 ` pault at gcc dot gnu dot org
2005-11-10  2:46 ` pinskia at gcc dot gnu dot org
2006-06-05  7:45 ` pault at gcc dot gnu dot org
2006-06-05 10:15 ` pault at gcc dot gnu dot org
2006-06-05 10:29 ` pault at gcc dot gnu dot org
2005-04-08 15:49 [Bug fortran/20838] New: error needed jv244 at cam dot ac dot uk
2005-06-26 17:19 ` [Bug fortran/20838] ICE in gfc_conv_expr_descriptor, at fortran/trans-array.c:3606 pinskia at gcc dot gnu dot org
2005-09-18  6:01 ` pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051106200520.15381.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).