public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer
@ 2015-02-11 18:02 matt at gneilson dot plus.com
  2015-02-11 18:05 ` [Bug fortran/65024] " dominiq at lps dot ens.fr
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: matt at gneilson dot plus.com @ 2015-02-11 18:02 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 6477 bytes --]

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024

            Bug ID: 65024
           Summary: Internal compiler error (gfortran) concerning
                    unlimited polymorphic pointer
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: matt at gneilson dot plus.com

Created attachment 34732
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34732&action=edit
Sample program that produces the referenced internal compiler error.

As explained in the GNU Fortran mailing list (see
http://gcc.gnu.org/ml/fortran/2015-02/msg00047.html ).

Please find attached some annotated sample code ('test.f90') that produces the
error in question. The compiler seems to have trouble with the subroutine that
I've named 'BUG' (lines 37-50); more specifically, the compiler appears to be
complaining about line 48 (which I have labelled line "C"). The 'BUG'
subroutine calls the subroutine named 'NEXT' to associate the 'e' pointer with
a piece of preallocated memory, and then points the unlimited polymorphic
'e%info' variable to the piece of memory associated with the pointer 'p'.
Attempting to compile the code as-is produces the following output:

### Beginning of Terminal output ###

matt$ gfortran -v -save-temps -o test test.f90 
Driving: gfortran -mmacosx-version-min=10.10.1 -v -save-temps -o test test.f90
-l gfortran -shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin14.0.0/4.9.2/lto-wrapper
Target: x86_64-apple-darwin14.0.0
Configured with: ../gcc-4.9-20141029/configure --enable-languages=c++,fortran
Thread model: posix
gcc version 4.9.2 20141029 (prerelease) (GCC) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.10.1' '-v' '-save-temps' '-o'
'test' '-shared-libgcc' '-mtune=core2'
 /usr/local/libexec/gcc/x86_64-apple-darwin14.0.0/4.9.2/f951 test.f90 -fPIC
-quiet -dumpbase test.f90 -mmacosx-version-min=10.10.1 -mtune=core2 -auxbase
test -version -fintrinsic-modules-path
/usr/local/lib/gcc/x86_64-apple-darwin14.0.0/4.9.2/finclude -o test.s
GNU Fortran (GCC) version 4.9.2 20141029 (prerelease)
(x86_64-apple-darwin14.0.0)
    compiled by GNU C version 4.9.2 20141029 (prerelease), GMP version 6.0.0,
MPFR version 3.1.2-p10, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran (GCC) version 4.9.2 20141029 (prerelease)
(x86_64-apple-darwin14.0.0)
    compiled by GNU C version 4.9.2 20141029 (prerelease), GMP version 6.0.0,
MPFR version 3.1.2-p10, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
test.f90: In function ‘bug’:
test.f90:48:0: internal compiler error: in gfc_conv_component_ref, at
fortran/trans-expr.c:1660
       e%info => p      ! line "C"
 ^

test.f90:48:0: internal compiler error: Abort trap: 6
gfortran: internal compiler error: Abort trap: 6 (program f951)
Abort trap: 6

### End of Terminal output ###

Oddly enough, the code compiles without error if I comment-out the call to
'NEXT' (line 42, which I've labelled line "A") and uncomment lines 43-45 (which
I've labelled lines "B_1", "B_2", and "B_3"), even though the 'NEXT' subroutine
contains *exactly* the same content as lines 43-45.

Andre Vehreschild responded to my post on the GNU Fortran mailing list, and he
recommended that I add the following information:

"When translating the pointer assignment in the select type the backend_decl of
the _vptr's component-ref is not initialized (== NULL), leading to the crash
experienced here. I haven't encountered something similar yet, therefore I can
only guess: Something going wrong in the resolve-stage?"
>From gcc-bugs-return-476900-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Feb 11 18:03:20 2015
Return-Path: <gcc-bugs-return-476900-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 6559 invoked by alias); 11 Feb 2015 18:03:20 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 6419 invoked by uid 48); 11 Feb 2015 18:03:15 -0000
From: "fkrogh#gcc at mathalacarte dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/65025] New: Internal compiler error with preprocessor in gfortran
Date: Wed, 11 Feb 2015 18:03:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: fkrogh#gcc at mathalacarte dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created
Message-ID: <bug-65025-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-02/txt/msg01233.txt.bz2
Content-length: 783

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide025

            Bug ID: 65025
           Summary: Internal compiler error with preprocessor in gfortran
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fkrogh#gcc at mathalacarte dot com

Created attachment 34733
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id4733&actioníit
Short program that gives the internal compiler error

Compile the attached with

gfortran -Dplet_=\'d\' -g -o test test.F90

or replace the d with s, q, or nonsense.  The kind of preprocessor code used
here seems to be handled just fine in the case of C code for gcc.


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

* [Bug fortran/65024] Internal compiler error (gfortran) concerning unlimited polymorphic pointer
  2015-02-11 18:02 [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer matt at gneilson dot plus.com
@ 2015-02-11 18:05 ` dominiq at lps dot ens.fr
  2015-02-11 20:14 ` [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE " janus at gcc dot gnu.org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-02-11 18:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-02-11
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed on 4.8, 4.9, and 5.0 (trunk).


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

* [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE concerning unlimited polymorphic pointer
  2015-02-11 18:02 [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer matt at gneilson dot plus.com
  2015-02-11 18:05 ` [Bug fortran/65024] " dominiq at lps dot ens.fr
@ 2015-02-11 20:14 ` janus at gcc dot gnu.org
  2015-02-11 21:28 ` matt at gneilson dot plus.com
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: janus at gcc dot gnu.org @ 2015-02-11 20:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
                 CC|                            |janus at gcc dot gnu.org
            Summary|Internal compiler error     |[4.9/5 Regression] [OOP]
                   |(gfortran) concerning       |ICE concerning unlimited
                   |unlimited polymorphic       |polymorphic pointer
                   |pointer                     |

--- Comment #2 from janus at gcc dot gnu.org ---
Here is a reduced/modified version:


MODULE X
  TYPE T
    CLASS(*), pointer :: info
  END TYPE
END MODULE

PROGRAM P
CONTAINS
  SUBROUTINE BUG
    USE X
    CLASS(T), pointer :: e
    e%info => NULL()      ! ICE
  END SUBROUTINE

  SUBROUTINE NEXT
    USE X
    CLASS (T), pointer :: e
  END SUBROUTINE
END


It produces the same ICE with 4.9 and trunk, but compiles cleanly with 4.8.


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

* [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE concerning unlimited polymorphic pointer
  2015-02-11 18:02 [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer matt at gneilson dot plus.com
  2015-02-11 18:05 ` [Bug fortran/65024] " dominiq at lps dot ens.fr
  2015-02-11 20:14 ` [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE " janus at gcc dot gnu.org
@ 2015-02-11 21:28 ` matt at gneilson dot plus.com
  2015-02-15 14:37 ` dominiq at lps dot ens.fr
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: matt at gneilson dot plus.com @ 2015-02-11 21:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024

--- Comment #3 from homgran <matt at gneilson dot plus.com> ---
Interesting... I've just tested Janus' reduced/modified version with "GNU
Fortran (GCC) 4.8.1 20130404 (prerelease)", and it does indeed compile cleanly.
However, my sample code ('test.f90', attached to the original post) produces an
ICE when attempting to compile with "GNU Fortran (GCC) 4.8.1 20130404
(prerelease)".

### Beginning of Terminal output ###

matt$ gfortran -v -save-temps -o test test.f90 
Driving: gfortran -mmacosx-version-min=10.8.3 -v -save-temps -o test test.f90
-l gfortran -shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin12.3.0/4.8.1/lto-wrapper
Target: x86_64-apple-darwin12.3.0
Configured with: ../gcc-4.8-20130404/configure --enable-languages=fortran,c++
Thread model: posix
gcc version 4.8.1 20130404 (prerelease) (GCC) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.8.3' '-v' '-save-temps' '-o'
'test' '-shared-libgcc' '-mtune=core2'
 /usr/local/libexec/gcc/x86_64-apple-darwin12.3.0/4.8.1/f951 test.f90 -fPIC
-quiet -dumpbase test.f90 -mmacosx-version-min=10.8.3 -mtune=core2 -auxbase
test -version -fintrinsic-modules-path
/usr/local/lib/gcc/x86_64-apple-darwin12.3.0/4.8.1/finclude -o test.s
GNU Fortran (GCC) version 4.8.1 20130404 (prerelease)
(x86_64-apple-darwin12.3.0)
    compiled by GNU C version 4.8.1 20130404 (prerelease), GMP version 4.3.1,
MPFR version 2.4.1, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran (GCC) version 4.8.1 20130404 (prerelease)
(x86_64-apple-darwin12.3.0)
    compiled by GNU C version 4.8.1 20130404 (prerelease), GMP version 4.3.1,
MPFR version 2.4.1, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
test.f90: In function ‘bug’:
test.f90:48:0: internal compiler error: in gfc_conv_component_ref, at
fortran/trans-expr.c:1553
       e%info => p      ! line "C"
 ^

test.f90:48:0: internal compiler error: Abort trap: 6
gfortran: internal compiler error: Abort trap: 6 (program f951)
Abort trap: 6

### End of Terminal output ###
>From gcc-bugs-return-476932-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Feb 11 21:46:34 2015
Return-Path: <gcc-bugs-return-476932-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 1435 invoked by alias); 11 Feb 2015 21:46:34 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 1309 invoked by uid 48); 11 Feb 2015 21:46:31 -0000
From: "jiwang at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/65020] [5 regression] bootstrap failed on arm because of  r219789
Date: Wed, 11 Feb 2015 21:46:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jiwang at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-65020-4-Pg18UeMk5p@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65020-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65020-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-02/txt/msg01265.txt.bz2
Content-length: 460

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide020

Jiong Wang <jiwang at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from Jiong Wang <jiwang at gcc dot gnu.org> ---
confirmed. with 220316, the failure gone away.


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

* [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE concerning unlimited polymorphic pointer
  2015-02-11 18:02 [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer matt at gneilson dot plus.com
                   ` (2 preceding siblings ...)
  2015-02-11 21:28 ` matt at gneilson dot plus.com
@ 2015-02-15 14:37 ` dominiq at lps dot ens.fr
  2015-02-15 23:02 ` dominiq at lps dot ens.fr
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-02-15 14:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pault at gcc dot gnu.org

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
The ICE for the reduced test in comment 2 appeared between revisions r207428
(2014-02-03, OK) and r207996 (2014-02-21, ICE).

AFAICT the ICE for the original test is as old as the first implementation of
unlimited polymorphism.


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

* [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE concerning unlimited polymorphic pointer
  2015-02-11 18:02 [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer matt at gneilson dot plus.com
                   ` (3 preceding siblings ...)
  2015-02-15 14:37 ` dominiq at lps dot ens.fr
@ 2015-02-15 23:02 ` dominiq at lps dot ens.fr
  2015-02-16  8:56 ` janus at gcc dot gnu.org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-02-15 23:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> The ICE for the reduced test in comment 2 appeared between revisions
> r207428 (2014-02-03, OK) and r207996 (2014-02-21, ICE).

Started at r207986.


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

* [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE concerning unlimited polymorphic pointer
  2015-02-11 18:02 [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer matt at gneilson dot plus.com
                   ` (4 preceding siblings ...)
  2015-02-15 23:02 ` dominiq at lps dot ens.fr
@ 2015-02-16  8:56 ` janus at gcc dot gnu.org
  2015-02-16 12:40 ` matt at gneilson dot plus.com
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: janus at gcc dot gnu.org @ 2015-02-16  8:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024

--- Comment #6 from janus at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #5)
> > The ICE for the reduced test in comment 2 [...]
> Started at r207986.

Huh, that was me committing a patch for PR 60234. Guess I should take a look
(but will probably not manage to do so before the weekend ...)


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

* [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE concerning unlimited polymorphic pointer
  2015-02-11 18:02 [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer matt at gneilson dot plus.com
                   ` (5 preceding siblings ...)
  2015-02-16  8:56 ` janus at gcc dot gnu.org
@ 2015-02-16 12:40 ` matt at gneilson dot plus.com
  2015-02-16 15:00 ` dominiq at lps dot ens.fr
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: matt at gneilson dot plus.com @ 2015-02-16 12:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024

--- Comment #7 from homgran <matt at gneilson dot plus.com> ---
(In reply to Dominique d'Humieres from comment #4)
> AFAICT the ICE for the original test is as old as the first implementation
> of unlimited polymorphism.

In that case, should we remove the '[4.9/5 Regression]' tag from the summary
title?


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

* [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE concerning unlimited polymorphic pointer
  2015-02-11 18:02 [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer matt at gneilson dot plus.com
                   ` (6 preceding siblings ...)
  2015-02-16 12:40 ` matt at gneilson dot plus.com
@ 2015-02-16 15:00 ` dominiq at lps dot ens.fr
  2015-02-16 15:19 ` matt at gneilson dot plus.com
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-02-16 15:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024

--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> > AFAICT the ICE for the original test is as old as the first implementation
> > of unlimited polymorphism.
>
> In that case, should we remove the '[4.9/5 Regression]' tag from the summary title?

Please don't do that.

(1) The ICE for the reduced test in comment 2 is a regression. Leave some time
to Janus to look at the problem:

> > > The ICE for the reduced test in comment 2 [...]
> > Started at r207986.
>
> Huh, that was me committing a patch for PR 60234. Guess I should take a look
> (but will probably not manage to do so before the weekend ...)

(2) There are presently more than 800 open PRs, but less than 40 regressions
that can be fixed during stage 4.


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

* [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE concerning unlimited polymorphic pointer
  2015-02-11 18:02 [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer matt at gneilson dot plus.com
                   ` (7 preceding siblings ...)
  2015-02-16 15:00 ` dominiq at lps dot ens.fr
@ 2015-02-16 15:19 ` matt at gneilson dot plus.com
  2015-02-16 18:53 ` pault at gcc dot gnu.org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: matt at gneilson dot plus.com @ 2015-02-16 15:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024

--- Comment #9 from homgran <matt at gneilson dot plus.com> ---
(In reply to Dominique d'Humieres from comment #8)
> > > AFAICT the ICE for the original test is as old as the first implementation
> > > of unlimited polymorphism.
> >
> > In that case, should we remove the '[4.9/5 Regression]' tag from the summary title?
> 
> Please don't do that.
> 
> (1) The ICE for the reduced test in comment 2 is a regression. Leave some
> time to Janus to look at the problem:
> 
> > > > The ICE for the reduced test in comment 2 [...]
> > > Started at r207986.
> >
> > Huh, that was me committing a patch for PR 60234. Guess I should take a look
> > (but will probably not manage to do so before the weekend ...)
> 
> (2) There are presently more than 800 open PRs, but less than 40 regressions
> that can be fixed during stage 4.

No problem, I was just checking. This is my first time using bugzilla, so I'm
happy to just sit back and observe (perhaps making the occasional comment). I
certainly don't want to get in anybody's way!


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

* [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE concerning unlimited polymorphic pointer
  2015-02-11 18:02 [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer matt at gneilson dot plus.com
                   ` (8 preceding siblings ...)
  2015-02-16 15:19 ` matt at gneilson dot plus.com
@ 2015-02-16 18:53 ` pault at gcc dot gnu.org
  2015-03-09 14:42 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu.org @ 2015-02-16 18:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024

--- Comment #10 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to homgran from comment #9)
> (In reply to Dominique d'Humieres from comment #8)
> > > > AFAICT the ICE for the original test is as old as the first implementation
> > > > of unlimited polymorphism.
> > >
> > > In that case, should we remove the '[4.9/5 Regression]' tag from the summary title?
> > 
> > Please don't do that.
> > 

I agree.

If the type 'T' is declared in the main programme the problem goes away. The
ICE occurs in the course of nullifying the vptr field. It appears that this
latter has no backend_decl; hence the ICE. I think that this implies that
something is going wrong with building the structure for the class component
but I haven't yet found why being use associated makes a difference.

This works fine:
MODULE X
  TYPE T
    CLASS(*), pointer :: info
  END TYPE
END MODULE

PROGRAM P
  use x
  class(T), target, allocatable :: tgt
CONTAINS
  SUBROUTINE BUG
    USE X
    CLASS(T), pointer :: e
   e=>tgt
  END SUBROUTINE

  SUBROUTINE NEXT
    USE X
    CLASS (T), pointer :: e
  END SUBROUTINE
END

Cheers

Paul


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

* [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE concerning unlimited polymorphic pointer
  2015-02-11 18:02 [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer matt at gneilson dot plus.com
                   ` (9 preceding siblings ...)
  2015-02-16 18:53 ` pault at gcc dot gnu.org
@ 2015-03-09 14:42 ` rguenth at gcc dot gnu.org
  2015-03-10 19:39 ` pault at gcc dot gnu.org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-03-09 14:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
   Target Milestone|---                         |4.9.3


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

* [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE concerning unlimited polymorphic pointer
  2015-02-11 18:02 [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer matt at gneilson dot plus.com
                   ` (10 preceding siblings ...)
  2015-03-09 14:42 ` rguenth at gcc dot gnu.org
@ 2015-03-10 19:39 ` pault at gcc dot gnu.org
  2015-03-10 22:24 ` pault at gcc dot gnu.org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu.org @ 2015-03-10 19:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024

--- Comment #11 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Tue Mar 10 19:39:05 2015
New Revision: 221334

URL: https://gcc.gnu.org/viewcvs?rev=221334&root=gcc&view=rev
Log:
2015-03-10  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/65024
    * trans-expr.c (gfc_conv_component_ref): If the component
    backend declaration is missing and the derived type symbol is
    available in the reference, call gfc_build_derived_type.

2015-03-10  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/65024
    * gfortran.dg/unlimited_polymorphic_23.f90: New test

Added:
    trunk/gcc/testsuite/gfortran.dg/unlimited_polymorphic_23.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE concerning unlimited polymorphic pointer
  2015-02-11 18:02 [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer matt at gneilson dot plus.com
                   ` (11 preceding siblings ...)
  2015-03-10 19:39 ` pault at gcc dot gnu.org
@ 2015-03-10 22:24 ` pault at gcc dot gnu.org
  2015-03-15  9:13 ` pault at gcc dot gnu.org
  2015-03-15  9:23 ` [Bug fortran/65024] [OOP] unlimited polymorphic pointer structure not built when it should be pault at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu.org @ 2015-03-10 22:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024

--- Comment #12 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Tue Mar 10 22:24:01 2015
New Revision: 221338

URL: https://gcc.gnu.org/viewcvs?rev=221338&root=gcc&view=rev
Log:
2015-03-10  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/65024
    * trans-expr.c (gfc_conv_component_ref): If the component
    backend declaration is missing and the derived type symbol is
    available in the reference, call gfc_build_derived_type.

2015-03-10  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/65024
    * gfortran.dg/unlimited_polymorphic_23.f90: New test

Added:
   
branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/unlimited_polymorphic_23.f90
Modified:
    branches/gcc-4_9-branch/gcc/fortran/ChangeLog
    branches/gcc-4_9-branch/gcc/fortran/trans-expr.c
    branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


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

* [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE concerning unlimited polymorphic pointer
  2015-02-11 18:02 [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer matt at gneilson dot plus.com
                   ` (12 preceding siblings ...)
  2015-03-10 22:24 ` pault at gcc dot gnu.org
@ 2015-03-15  9:13 ` pault at gcc dot gnu.org
  2015-03-15  9:23 ` [Bug fortran/65024] [OOP] unlimited polymorphic pointer structure not built when it should be pault at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu.org @ 2015-03-15  9:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024

--- Comment #13 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Sun Mar 15 09:13:03 2015
New Revision: 221440

URL: https://gcc.gnu.org/viewcvs?rev=221440&root=gcc&view=rev
Log:
2015-03-15  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/65024
    * trans-expr.c (gfc_conv_component_ref): If the component
    backend declaration is missing and the derived type symbol is
    available in the reference, call gfc_build_derived_type.

2015-03-15  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/65024
    * gfortran.dg/unlimited_polymorphic_23.f90: New test


Added:
   
branches/gcc-4_8-branch/gcc/testsuite/gfortran.dg/unlimited_polymorphic_23.f90
Modified:
    branches/gcc-4_8-branch/gcc/fortran/ChangeLog
    branches/gcc-4_8-branch/gcc/fortran/trans-expr.c
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


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

* [Bug fortran/65024] [OOP] unlimited polymorphic pointer structure not built when it should be
  2015-02-11 18:02 [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer matt at gneilson dot plus.com
                   ` (13 preceding siblings ...)
  2015-03-15  9:13 ` pault at gcc dot gnu.org
@ 2015-03-15  9:23 ` pault at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu.org @ 2015-03-15  9:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code           |FIXME
            Version|4.9.2                       |5.0
   Target Milestone|4.9.3                       |6.0
            Summary|[4.9/5 Regression] [OOP]    |[OOP] unlimited polymorphic
                   |ICE concerning unlimited    |pointer structure not built
                   |polymorphic pointer         |when it should be

--- Comment #14 from Paul Thomas <pault at gcc dot gnu.org> ---
Although the regression is fixed, it is desirable to find out why the unlimited
polymorphic type is not being built at source. This foxed me completely; albeit
with a limited amount of time spent on it. The patch has the virtue that it is
failsafe but I will leave the PR open.

Thanks for the report

Paul


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

end of thread, other threads:[~2015-03-15  9:23 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-11 18:02 [Bug fortran/65024] New: Internal compiler error (gfortran) concerning unlimited polymorphic pointer matt at gneilson dot plus.com
2015-02-11 18:05 ` [Bug fortran/65024] " dominiq at lps dot ens.fr
2015-02-11 20:14 ` [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE " janus at gcc dot gnu.org
2015-02-11 21:28 ` matt at gneilson dot plus.com
2015-02-15 14:37 ` dominiq at lps dot ens.fr
2015-02-15 23:02 ` dominiq at lps dot ens.fr
2015-02-16  8:56 ` janus at gcc dot gnu.org
2015-02-16 12:40 ` matt at gneilson dot plus.com
2015-02-16 15:00 ` dominiq at lps dot ens.fr
2015-02-16 15:19 ` matt at gneilson dot plus.com
2015-02-16 18:53 ` pault at gcc dot gnu.org
2015-03-09 14:42 ` rguenth at gcc dot gnu.org
2015-03-10 19:39 ` pault at gcc dot gnu.org
2015-03-10 22:24 ` pault at gcc dot gnu.org
2015-03-15  9:13 ` pault at gcc dot gnu.org
2015-03-15  9:23 ` [Bug fortran/65024] [OOP] unlimited polymorphic pointer structure not built when it should be pault at gcc dot gnu.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).