This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR 64757 - [5 Regression] ICE in fold_convert_loc, at fold-const.c:2353
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Dominique Dhumieres <dominiq at lps dot ens dot fr>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>
- Date: Mon, 2 Feb 2015 18:49:12 +0100
- Subject: Re: [Patch, fortran] PR 64757 - [5 Regression] ICE in fold_convert_loc, at fold-const.c:2353
- Authentication-results: sourceware.org; auth=none
- References: <20150202165342 dot D6531105 at mailhost dot lps dot ens dot fr>
Dear Dominique,
On transferring from my laptop to my workstation, I find that it
segfaults in runtime - both are x86_64/FC21. If I can, I intend to
investigate tonight.
Thanks for the report.
Paul
On 2 February 2015 at 17:53, Dominique Dhumieres <dominiq@lps.ens.fr> wrote:
> Dear Paul,
>
> I have tested your patch at https://gcc.gnu.org/ml/fortran/2015-01/txtwnaoa1115V.txt
> (the latest version) and I found that the test type_to_class_3.f03 is miscompiled
> (FAIL) with -flto -O0 -m64 (this does not happens with -flto -O0 -m32 or with -Ox and
> x!=0).
>
> In addition, while the reduced test
>
> type :: Test
> integer :: i
> end type
>
> type :: TestReference
> class(Test), allocatable :: test(:)
> end type
>
> type(TestReference) :: testList
> type(test), allocatable :: x(:)
>
> allocate (testList%test(2), source = [Test(99), Test(199)]) ! Works, of course
> print *, size(testList%test)
> x = testList%test
> print *, x
> end
>
> gives what I expect, i.e.,
>
> 2
> 99 199
>
> type :: Test
> integer :: i
> end type
>
> type :: TestReference
> class(Test), allocatable :: test(:)
> end type
>
> type(TestReference) :: testList
> type(test), allocatable :: x(:)
>
> testList = TestReference([Test(99), Test(199)]) ! Gave: The rank of the element in the
> ! structure constructor at (1) does not
> ! match that of the component (1/0)
> print *, size(testList%test)
> x = testList%test
> print *, x
> end
>
> gives
>
> 1
> 99
>
> Last problem I see,
>
> print *, TestReference([Test(99), Test(199)])
>
> gives the following ICE
>
> f951: internal compiler error: Bad IO basetype (7)
>
> type_to_class_3_red_2.f03:12:0:
>
> print *, TestReference([Test(99), Test(199)])
>
>
> Cheers,
>
> Dominique
--
Outside of a dog, a book is a man's best friend. Inside of a dog it's
too dark to read.
Groucho Marx