public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/24534] New: gfortran: regression w/ PUBLIC derived types with private components
@ 2005-10-26 8:07 anlauf at gmx dot de
2005-10-26 16:59 ` [Bug fortran/24534] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: anlauf at gmx dot de @ 2005-10-26 8:07 UTC (permalink / raw)
To: gcc-bugs
Hi,
the following valid code snippet recently stopped to compile cleanly:
module gfcbug28
! A publicly visible derived type with private components
type, public :: my_t
private
type(offset_t) :: offset
end type my_t
! Everything else is private...
private
type offset_t
integer :: i
end type offset_t
end module gfcbug28
I get:
In file gfcbug28.f90:4
type, public :: my_t
1
Error: The component 'offset' is a PRIVATE type and cannot be a component of
'my_t', which is PUBLIC at (1)
This is clearly nonsense. Although the type "my_t" is PUBLIC,
its components are not.
Cheers,
-ha
--
Summary: gfortran: regression w/ PUBLIC derived types with
private components
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: anlauf at gmx dot de
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24534
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/24534] [4.0/4.1 Regression] PUBLIC derived types with private components
2005-10-26 8:07 [Bug fortran/24534] New: gfortran: regression w/ PUBLIC derived types with private components anlauf at gmx dot de
@ 2005-10-26 16:59 ` pinskia at gcc dot gnu dot org
2005-10-29 15:15 ` [Bug fortran/24534] " steven at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-26 16:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-10-26 16:59 -------
Confirmed, There might be just some missing check for this.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |rejects-valid
Last reconfirmed|0000-00-00 00:00:00 |2005-10-26 16:59:36
date| |
Summary|gfortran: regression w/ |[4.0/4.1 Regression] PUBLIC
|PUBLIC derived types with |derived types with private
|private components |components
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24534
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/24534] PUBLIC derived types with private components
2005-10-26 8:07 [Bug fortran/24534] New: gfortran: regression w/ PUBLIC derived types with private components anlauf at gmx dot de
2005-10-26 16:59 ` [Bug fortran/24534] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-10-29 15:15 ` steven at gcc dot gnu dot org
2005-10-29 15:20 ` [Bug fortran/24534] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-10-29 15:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from steven at gcc dot gnu dot org 2005-10-29 15:15 -------
How can this possibly be a GCC 4.0/4.1 regression?!
Before GCC 4.0 we didn't even have a Fortran with support for derived types.
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.0/4.1 Regression] PUBLIC |PUBLIC derived types with
|derived types with private |private components
|components |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24534
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/24534] [4.0/4.1 Regression] PUBLIC derived types with private components
2005-10-26 8:07 [Bug fortran/24534] New: gfortran: regression w/ PUBLIC derived types with private components anlauf at gmx dot de
2005-10-26 16:59 ` [Bug fortran/24534] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-10-29 15:15 ` [Bug fortran/24534] " steven at gcc dot gnu dot org
@ 2005-10-29 15:20 ` pinskia at gcc dot gnu dot org
2005-10-30 23:25 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-29 15:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2005-10-29 15:20 -------
(In reply to comment #2)
> How can this possibly be a GCC 4.0/4.1 regression?!
Because in 4.0.0, this worked.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.1.0 4.0.3
Known to work| |4.0.0
Summary|PUBLIC derived types with |[4.0/4.1 Regression] PUBLIC
|private components |derived types with private
| |components
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24534
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/24534] [4.0/4.1 Regression] PUBLIC derived types with private components
2005-10-26 8:07 [Bug fortran/24534] New: gfortran: regression w/ PUBLIC derived types with private components anlauf at gmx dot de
` (2 preceding siblings ...)
2005-10-29 15:20 ` [Bug fortran/24534] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-10-30 23:25 ` pinskia at gcc dot gnu dot org
2005-10-31 8:09 ` anlauf at gmx dot de
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-30 23:25 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P5
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24534
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/24534] [4.0/4.1 Regression] PUBLIC derived types with private components
2005-10-26 8:07 [Bug fortran/24534] New: gfortran: regression w/ PUBLIC derived types with private components anlauf at gmx dot de
` (3 preceding siblings ...)
2005-10-30 23:25 ` pinskia at gcc dot gnu dot org
@ 2005-10-31 8:09 ` anlauf at gmx dot de
2005-11-01 19:22 ` tobi at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: anlauf at gmx dot de @ 2005-10-31 8:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from anlauf at gmx dot de 2005-10-31 08:09 -------
(In reply to comment #2)
> How can this possibly be a GCC 4.0/4.1 regression?!
It works with a GCC 4.1.0 20050913 snapshot, but not recent ones.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24534
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/24534] [4.0/4.1 Regression] PUBLIC derived types with private components
2005-10-26 8:07 [Bug fortran/24534] New: gfortran: regression w/ PUBLIC derived types with private components anlauf at gmx dot de
` (4 preceding siblings ...)
2005-10-31 8:09 ` anlauf at gmx dot de
@ 2005-11-01 19:22 ` tobi at gcc dot gnu dot org
2005-11-05 10:51 ` paulthomas2 at wanadoo dot fr
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-11-01 19:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from tobi at gcc dot gnu dot org 2005-11-01 19:22 -------
CCing pault, as he introduced that error. Looks like you've been to strict,
Paul
--
tobi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tobi at gcc dot gnu dot org,
| |pault at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24534
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/24534] [4.0/4.1 Regression] PUBLIC derived types with private components
2005-10-26 8:07 [Bug fortran/24534] New: gfortran: regression w/ PUBLIC derived types with private components anlauf at gmx dot de
` (5 preceding siblings ...)
2005-11-01 19:22 ` tobi at gcc dot gnu dot org
@ 2005-11-05 10:51 ` paulthomas2 at wanadoo dot fr
2005-11-05 11:06 ` pault at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2005-11-05 10:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from paulthomas2 at wanadoo dot fr 2005-11-05 10:51 -------
Subject: Re: [4.0/4.1 Regression] PUBLIC derived types
with private components
tobi at gcc dot gnu dot org wrote:
>------- Comment #5 from tobi at gcc dot gnu dot org 2005-11-01 19:22 -------
>CCing pault, as he introduced that error. Looks like you've been to strict,
>Paul
>
>
>
>
I'll have a look at it tomorrow.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24534
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/24534] [4.0/4.1 Regression] PUBLIC derived types with private components
2005-10-26 8:07 [Bug fortran/24534] New: gfortran: regression w/ PUBLIC derived types with private components anlauf at gmx dot de
` (6 preceding siblings ...)
2005-11-05 10:51 ` paulthomas2 at wanadoo dot fr
@ 2005-11-05 11:06 ` pault at gcc dot gnu dot org
2005-11-05 17:23 ` pault at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu dot org @ 2005-11-05 11:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pault at gcc dot gnu dot org 2005-11-05 11:06 -------
Yes, I have been too strict. The private derived type must be accessible
inside the module where it is defined (4.4.1).
I'll have a patch ready before the weekend is out.
Thanks Harald!
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24534
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/24534] [4.0/4.1 Regression] PUBLIC derived types with private components
2005-10-26 8:07 [Bug fortran/24534] New: gfortran: regression w/ PUBLIC derived types with private components anlauf at gmx dot de
` (7 preceding siblings ...)
2005-11-05 11:06 ` pault at gcc dot gnu dot org
@ 2005-11-05 17:23 ` pault at gcc dot gnu dot org
2005-11-06 20:05 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu dot org @ 2005-11-05 17:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pault at gcc dot gnu dot org 2005-11-05 17:22 -------
>
> This is clearly nonsense. Although the type "my_t" is PUBLIC,
> its components are not.
>
No, this is not nonsense, just incorrect. See PR16404 and the discussion about
test #6.
I have incompletely applied the constraint.....
..... standard have a peculiar order, but the first constraint after R427 says:
"If a component of a derived type is of a ttype declared to be private, either
the derived type definition must contain the PRIVATE stement, or the derived
type must be private."
Therefore, the addition of sym->component_access != ACCESS_PRIVATE to the if
statement that produces the error and the addition of your testcase to the
testsuite fixes the problem (It's just now regtesting).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24534
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/24534] [4.0/4.1 Regression] PUBLIC derived types with private components
2005-10-26 8:07 [Bug fortran/24534] New: gfortran: regression w/ PUBLIC derived types with private components anlauf at gmx dot de
` (8 preceding siblings ...)
2005-11-05 17:23 ` pault at gcc dot gnu dot org
@ 2005-11-06 20:05 ` pault at gcc dot gnu dot org
2005-11-06 22:50 ` pault at gcc dot gnu dot org
2005-11-06 22:51 ` pault at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu dot org @ 2005-11-06 20:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pault at gcc dot gnu dot org 2005-11-06 20:05 -------
Subject: Bug 24534
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=24534
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/24534] [4.0/4.1 Regression] PUBLIC derived types with private components
2005-10-26 8:07 [Bug fortran/24534] New: gfortran: regression w/ PUBLIC derived types with private components anlauf at gmx dot de
` (9 preceding siblings ...)
2005-11-06 20:05 ` pault at gcc dot gnu dot org
@ 2005-11-06 22:50 ` pault at gcc dot gnu dot org
2005-11-06 22:51 ` pault at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu dot org @ 2005-11-06 22:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from pault at gcc dot gnu dot org 2005-11-06 22:50 -------
Subject: Bug 24534
Author: pault
Date: Sun Nov 6 22:50:38 2005
New Revision: 106572
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106572
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 host 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:
branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/arrayio_0.f90 (with
props)
branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/data_constraints_1.f90
branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/data_constraints_2.f90
branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/data_initialized.f90
branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/pointer_assign_1.f90
(with props)
Modified:
branches/gcc-4_0-branch/gcc/fortran/ChangeLog
branches/gcc-4_0-branch/gcc/fortran/data.c
branches/gcc-4_0-branch/gcc/fortran/decl.c
branches/gcc-4_0-branch/gcc/fortran/expr.c
branches/gcc-4_0-branch/gcc/fortran/gfortran.h
branches/gcc-4_0-branch/gcc/fortran/io.c
branches/gcc-4_0-branch/gcc/fortran/resolve.c
branches/gcc-4_0-branch/gcc/fortran/symbol.c
branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/private_type_2.f90
Added: branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/arrayio_0.f90
URL:
http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/arrayio_0.f90?root=gcc&view=auto&rev=106572
==============================================================================
--- branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/arrayio_0.f90 (added)
+++ branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/arrayio_0.f90 Sun Nov 6
22:50:38 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: branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/arrayio_0.f90
('svn:executable' added)
Added: branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/pointer_assign_1.f90
URL:
http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/pointer_assign_1.f90?root=gcc&view=auto&rev=106572
==============================================================================
--- branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/pointer_assign_1.f90
(added)
+++ branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/pointer_assign_1.f90 Sun
Nov 6 22:50:38 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:
branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/pointer_assign_1.f90
('svn:executable' added)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24534
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/24534] [4.0/4.1 Regression] PUBLIC derived types with private components
2005-10-26 8:07 [Bug fortran/24534] New: gfortran: regression w/ PUBLIC derived types with private components anlauf at gmx dot de
` (10 preceding siblings ...)
2005-11-06 22:50 ` pault at gcc dot gnu dot org
@ 2005-11-06 22:51 ` pault at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu dot org @ 2005-11-06 22:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from pault at gcc dot gnu dot org 2005-11-06 22:51 -------
Fixed on mainline and 4.0.
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24534
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2005-11-06 22:51 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-26 8:07 [Bug fortran/24534] New: gfortran: regression w/ PUBLIC derived types with private components anlauf at gmx dot de
2005-10-26 16:59 ` [Bug fortran/24534] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-10-29 15:15 ` [Bug fortran/24534] " steven at gcc dot gnu dot org
2005-10-29 15:20 ` [Bug fortran/24534] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-10-30 23:25 ` pinskia at gcc dot gnu dot org
2005-10-31 8:09 ` anlauf at gmx dot de
2005-11-01 19:22 ` tobi at gcc dot gnu dot org
2005-11-05 10:51 ` paulthomas2 at wanadoo dot fr
2005-11-05 11:06 ` pault at gcc dot gnu dot org
2005-11-05 17:23 ` pault at gcc dot gnu dot org
2005-11-06 20:05 ` pault at gcc dot gnu dot org
2005-11-06 22:50 ` pault at gcc dot gnu dot org
2005-11-06 22:51 ` pault 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).