Bug 47516 - testsuite failure: realloc_on_assign_2.f03 (with --disable-bootstrap)
testsuite failure: realloc_on_assign_2.f03 (with --disable-bootstrap)
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: fortran
4.6.0
: P3 normal
: ---
Assigned To: Not yet assigned to anyone
: ice-on-valid-code
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-28 14:58 UTC by Tobias Burnus
Modified: 2011-06-18 08:45 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2011-01-30 15:11:25


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2011-01-28 14:58:47 UTC
Moved from bug 35810 comment 12. Janus wrote there the following; I have not tried to confirm it.

-------- Bug 35810 Comment 12 janus 2010-12-30 13:18:14 CET ---------

Note: realloc_on_assign_2.f03 fails on current trunk when building with
--disable-bootstrap (system compiler: gcc version 4.5.0 20100604
[gcc-4_5-branch revision 160292]):

realloc_on_assign_2.f03: In function ‘test5’:
realloc_on_assign_2.f03:101:0: internal compiler error: in fold_convert_loc, at
fold-const.c:1906


Reduced test case:

program test5
  real, allocatable, dimension (:,:) :: xwrkt
  xwrkt = trs2a2 ()
contains
  function trs2a2 ()
    real, dimension (1:2,1:2) :: trs2a2
    trs2a2 = 0.0
  end function
end
Comment 1 paul.richard.thomas@gmail.com 2011-01-28 15:14:24 UTC
 gcc version 4.5.0 20100604??? version is marked as 4.6.0

Paul

On Fri, Jan 28, 2011 at 3:59 PM, burnus at gcc dot gnu.org
<gcc-bugzilla@gcc.gnu.org> wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47516
>
>           Summary: ICE with reallocate on assignment w/
>                    --disable-bootstrap
>           Product: gcc
>           Version: 4.6.0
>            Status: UNCONFIRMED
>          Keywords: ice-on-valid-code
>          Severity: normal
>          Priority: P3
>         Component: fortran
>        AssignedTo: unassigned@gcc.gnu.org
>        ReportedBy: burnus@gcc.gnu.org
>                CC: pault@gcc.gnu.org, janus@gcc.gnu.org
>
>
> Moved from bug 35810 comment 12. Janus wrote there the following; I have not
> tried to confirm it.
>
> -------- Bug 35810 Comment 12 janus 2010-12-30 13:18:14 CET ---------
>
> Note: realloc_on_assign_2.f03 fails on current trunk when building with
> --disable-bootstrap (system compiler: gcc version 4.5.0 20100604
> [gcc-4_5-branch revision 160292]):
>
> realloc_on_assign_2.f03: In function ‘test5’:
> realloc_on_assign_2.f03:101:0: internal compiler error: in fold_convert_loc, at
> fold-const.c:1906
>
>
> Reduced test case:
>
> program test5
>  real, allocatable, dimension (:,:) :: xwrkt
>  xwrkt = trs2a2 ()
> contains
>  function trs2a2 ()
>    real, dimension (1:2,1:2) :: trs2a2
>    trs2a2 = 0.0
>  end function
> end
>
> --
> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>
Comment 2 janus 2011-01-30 13:34:08 UTC
(In reply to comment #1)
>  gcc version 4.5.0 20100604??? version is marked as 4.6.0

4.5.0 is the system compiler which I use to build the GCC trunk. Since the failure only appears with --disable-bootstrap that might be relevant.

I still see this problem at r169406.
Comment 3 Tobias Burnus 2011-01-30 14:17:59 UTC
(In reply to comment #2)
> 4.5.0 is the system compiler which I use to build the GCC trunk. Since the
> failure only appears with --disable-bootstrap that might be relevant.
> 
> I still see this problem at r169406.

Can you try again using GCC 4.6.0 r169406 as compiler? (I.e. setting the PATH and LD_LIBRARY_PATH such that 4.6.0 is used.)

For curiosity, I will try to compile without bootstrapping with
   4.5.1 20101208 [gcc-4_5-branch revision 167585]

However, it looks as if GCC 4.5.0 miscompiles f951; except for not bootstrapping, there should be no difference between --disable-bootstrap and not. (Contrary to --enable-checking=release.)
Comment 4 Tobias Burnus 2011-01-30 15:11:25 UTC
(In reply to comment #3)
> For curiosity, I will try to compile without bootstrapping with
>    4.5.1 20101208 [gcc-4_5-branch revision 167585]

Compiling finished - and works (x86-64-linux); I run f951 under valgrind and it also did not show any problems.

> Can you try again using GCC 4.6.0 r169406 as compiler? (I.e. setting the PATH
> and LD_LIBRARY_PATH such that 4.6.0 is used.)

Setting status to waiting.
Comment 5 Michael Matz 2011-03-30 17:31:58 UTC
Author: matz
Date: Wed Mar 30 17:31:54 2011
New Revision: 171736

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171736
Log:
        PR fortran/47516
	* trans-expr.c (realloc_lhs_loop_for_fcn_call): Take loop as parameter,
	don't use local variable.
	(gfc_trans_arrayfunc_assign): Adjust caller.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-expr.c
Comment 6 Tobias Burnus 2011-06-17 08:59:44 UTC
Close as fixed as a patch has been committed. I assume, no one can reproduce it any more?
Comment 7 paul.richard.thomas@gmail.com 2011-06-18 08:45:08 UTC
Dear All,

It was never there for me :-)

Yes, please close it.

Cheers

Paul

On 6/17/11, burnus at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org> wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47516
>
> Tobias Burnus <burnus at gcc dot gnu.org> changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|WAITING                     |RESOLVED
>          Resolution|                            |FIXED
>
> --- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-06-17
> 08:59:44 UTC ---
> Close as fixed as a patch has been committed. I assume, no one can reproduce
> it
> any more?
>
> --
> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>