public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE
@ 2012-01-26 23:14 burnus at gcc dot gnu.org
  2012-01-27  0:13 ` [Bug fortran/52012] " burnus at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-26 23:14 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52012
           Summary: [4.6/4.7 Regression] Wrong-code with RESHAPE
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: critical
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: pault@gcc.gnu.org


The following program prints with GCC 4.6 and 4.7:

   0.0000   0.0000   1.0000   0.0000   0.0000
   0.0000   0.0000   0.0000

Expected: The following result - as with GCC 4.5:

   0.0000   0.0000   1.0000   0.0000   0.0000
   0.0000   0.0000   1.0000

Doing a simple   print '(10f3.0)', a  shows the correct result. Thus, depending
how one accesses an array element, the result is correct or wrong.


The issue was reported by Reinhold Bader; I added the abort checks (both fail).


program gf
  implicit none
  real, allocatable :: a(:,:,:)
!  real :: a(5,4,3)
  real :: b(3,4,5) = 0.0
  b(1,2,3) = 1.0
  allocate(a(size(b,3),size(b,2),size(b,1)))
  a = reshape(b,shape(a),order=[3,2,1])
  write(*,*) a(:,2,1)
! the following line prints an incorrect value of a(3,2,1)
! even though the above one works correctly
  write(*,*) a(1,2,1), a(2,2,1), a(3,2,1)
  if (a(3,2,1) /= 1) call abort()
  if (sum(abs(a)) /= 1.0) call abort()
end program


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

* [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with RESHAPE
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
@ 2012-01-27  0:13 ` burnus at gcc dot gnu.org
  2012-01-27  0:22 ` dominiq at lps dot ens.fr
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-27  0:13 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org
      Known to work|                            |4.5.4
   Target Milestone|---                         |4.7.0
      Known to fail|                            |4.6.3, 4.7.0

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-26 23:14:42 UTC ---
Works: 4.6.0 2010-09-28 rev. 164677 (trunk)
Fails: 4.6.0 2010-12-31 rev. 168366 (trunk)


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

* [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with RESHAPE
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
  2012-01-27  0:13 ` [Bug fortran/52012] " burnus at gcc dot gnu.org
@ 2012-01-27  0:22 ` dominiq at lps dot ens.fr
  2012-01-27  0:26 ` [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment burnus at gcc dot gnu.org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-27  0:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-26
     Ever Confirmed|0                           |1

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-26 23:34:05 UTC ---
Reduced range

Works: 4.6.0 2010-11-26 rev. 167173 (trunk)
Fails: 4.6.0 2010-12-02 rev. 167380 (trunk)


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

* [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
  2012-01-27  0:13 ` [Bug fortran/52012] " burnus at gcc dot gnu.org
  2012-01-27  0:22 ` dominiq at lps dot ens.fr
@ 2012-01-27  0:26 ` burnus at gcc dot gnu.org
  2012-01-27  9:27 ` rguenth at gcc dot gnu.org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-27  0:26 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.6/4.7 Regression]        |[4.6/4.7 Regression]
                   |Wrong-code with RESHAPE     |Wrong-code with realloc on
                   |                            |assignment

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-26 23:43:35 UTC ---
Workaround: -fno-realloc-lhs

Thus, I assume that the culprit is Paul's patch for PR 35810 (Rev. 167220,
2010-11-28). http://gcc.gnu.org/viewcvs?view=revision&revision=167220


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

* [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-01-27  0:26 ` [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment burnus at gcc dot gnu.org
@ 2012-01-27  9:27 ` rguenth at gcc dot gnu.org
  2012-01-27 10:06 ` [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment and RESHAPE w/ ORDER= burnus at gcc dot gnu.org
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-27  9:27 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.0                       |4.6.3


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

* [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment and RESHAPE w/ ORDER=
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-01-27  9:27 ` rguenth at gcc dot gnu.org
@ 2012-01-27 10:06 ` burnus at gcc dot gnu.org
  2012-01-27 10:54 ` jakub at gcc dot gnu.org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-27 10:06 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.6/4.7 Regression]        |[4.6/4.7 Regression]
                   |Wrong-code with realloc on  |Wrong-code with realloc on
                   |assignment                  |assignment and RESHAPE w/
                   |                            |ORDER=

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-27 09:18:10 UTC ---
Up and including the RESHAPE call, everything looks fine. However, one then
updates the bounds as follows, which seems to fail.

If one does not use RESHAPE with the ORDER= argument, it works that the
"shape(a)" is used as argument to RESHAPE does not play a role.

          a.offset = 1;
          a.dim[0].lbound = 1;
          a.dim[0].ubound = a.dim[0].ubound + 1;
          a.offset = (a.dim[0].ubound - a.dim[0].lbound) + 1;
          a.dim[1].lbound = 1;
          a.dim[1].ubound = a.dim[1].ubound + 1;
          a.offset = (a.dim[1].ubound - a.dim[1].lbound) + 1;
          a.dim[2].lbound = 1;
          a.dim[2].ubound = a.dim[2].ubound + 1;
          a.offset = ~((a.dim[0].ubound - a.dim[0].lbound) + 1)
                   + ~(a.dim[1].ubound - a.dim[1].lbound);

 * * *

Additionally, the realloc on assignment may sets the wrong bounds if no
(re)allocation is needed. From trans-expr.c's fcncall_realloc_result:

  /* Now reset the bounds from zero based to unity based.  */

That's wrong. The lower bounds are remain the same, unless the RHS has a
different shape. Then, the LHS is reallocated with a lower bound of
lbound(RHS).

Thus, one expects "7 9 / 1 3" for the program below, but gfortran has "1 3  / 
1 3". Using for the RHS external functions, other expressions and variables
correctly keep the bounds, if no realloc happens.


integer, allocatable :: a(:), b(:)
allocate(b(3))
b = [1,2,3]

allocate (a(7:9))
a = reshape( b, shape=[size(b)])
print *, lbound(a), ubound(a) ! Expected: 7 9

deallocate (a)
a = reshape( b, shape=[size(b)])
print *, lbound(a), ubound(a) ! Expected: 1 3
end


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

* [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment and RESHAPE w/ ORDER=
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-01-27 10:06 ` [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment and RESHAPE w/ ORDER= burnus at gcc dot gnu.org
@ 2012-01-27 10:54 ` jakub at gcc dot gnu.org
  2012-01-30 22:21 ` pault at gcc dot gnu.org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-27 10:54 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
                 CC|                            |jakub at gcc dot gnu.org


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

* [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment and RESHAPE w/ ORDER=
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2012-01-27 10:54 ` jakub at gcc dot gnu.org
@ 2012-01-30 22:21 ` pault at gcc dot gnu.org
  2012-01-30 23:16 ` burnus at gcc dot gnu.org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pault at gcc dot gnu.org @ 2012-01-30 22:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> 2012-01-30 22:01:33 UTC ---
Created attachment 26520
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26520
a draft patch for the pr

This bootstraps and regtests OK.  I'll clean it up and prepare the testcase and
ChangeLogs for submission tomorrow.

Cheers

Paul


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

* [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment and RESHAPE w/ ORDER=
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2012-01-30 22:21 ` pault at gcc dot gnu.org
@ 2012-01-30 23:16 ` burnus at gcc dot gnu.org
  2012-01-31  9:47 ` paul.richard.thomas at gmail dot com
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-30 23:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-30 22:24:21 UTC ---
(In reply to comment #5)
> Created attachment 26520 [details]
> a draft patch for the pr
>
> This bootstraps and regtests OK.  I'll clean it up and prepare the testcase and
> ChangeLogs for submission tomorrow.

Thanks for fixing the more pressing issue.

(I think the other issue - second item in comment 4 - is not fixed; at least I
still get the wrong bound of "1 3". Expected: The bounds remain the same w/o
reallocation - only if realloced, they change to have lbound == 1.)


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

* [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment and RESHAPE w/ ORDER=
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2012-01-30 23:16 ` burnus at gcc dot gnu.org
@ 2012-01-31  9:47 ` paul.richard.thomas at gmail dot com
  2012-01-31 12:52 ` pault at gcc dot gnu.org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: paul.richard.thomas at gmail dot com @ 2012-01-31  9:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from paul.richard.thomas at gmail dot com <paul.richard.thomas at gmail dot com> 2012-01-31 08:23:18 UTC ---
Dear Tobias,

> Thanks for fixing the more pressing issue.
>
> (I think the other issue - second item in comment 4 - is not fixed; at least I
> still get the wrong bound of "1 3". Expected: The bounds remain the same w/o
> reallocation - only if realloced, they change to have lbound == 1.)

I am going to check this. When the original patch was written, I did
exactly as you say.  However, this caused a number of regressions,
where the bounds were expected to be unity based.

Cheers

Paul


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

* [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment and RESHAPE w/ ORDER=
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2012-01-31  9:47 ` paul.richard.thomas at gmail dot com
@ 2012-01-31 12:52 ` pault at gcc dot gnu.org
  2012-01-31 12:56 ` [Bug fortran/52012] " pault at gcc dot gnu.org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pault at gcc dot gnu.org @ 2012-01-31 12:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Paul Thomas <pault at gcc dot gnu.org> 2012-01-31 12:30:38 UTC ---
Author: pault
Date: Tue Jan 31 12:30:32 2012
New Revision: 183757

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183757
Log:
2012-01-31  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/52012
    * trans-expr.c (fcncall_realloc_result): Correct calculation of
    result offset.

2012-01-31  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/52012
    * gfortran.dg/realloc_on_assign_10.f90: New test.

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


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

* [Bug fortran/52012] Wrong-code with realloc on assignment and RESHAPE w/ ORDER=
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2012-01-31 12:52 ` pault at gcc dot gnu.org
@ 2012-01-31 12:56 ` pault at gcc dot gnu.org
  2012-01-31 13:02 ` pault at gcc dot gnu.org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pault at gcc dot gnu.org @ 2012-01-31 12:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.6/4.7 Regression]        |Wrong-code with realloc on
                   |Wrong-code with realloc on  |assignment and RESHAPE w/
                   |assignment and RESHAPE w/   |ORDER=
                   |ORDER=                      |

--- Comment #9 from Paul Thomas <pault at gcc dot gnu.org> 2012-01-31 12:47:19 UTC ---
I will keep this open to ensure that the issue raised in
http://gcc.gnu.org/ml/fortran/2012-01/msg00269.html gets dealt with.

No longer a regression however.

Paul


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

* [Bug fortran/52012] Wrong-code with realloc on assignment and RESHAPE w/ ORDER=
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2012-01-31 12:56 ` [Bug fortran/52012] " pault at gcc dot gnu.org
@ 2012-01-31 13:02 ` pault at gcc dot gnu.org
  2012-01-31 14:32 ` [Bug fortran/52012] [4.6/4.7 Regression] " burnus at gcc dot gnu.org
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pault at gcc dot gnu.org @ 2012-01-31 13:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal


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

* [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment and RESHAPE w/ ORDER=
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2012-01-31 13:02 ` pault at gcc dot gnu.org
@ 2012-01-31 14:32 ` burnus at gcc dot gnu.org
  2012-02-02 21:20 ` pault at gcc dot gnu.org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-31 14:32 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Wrong-code with realloc on  |[4.6/4.7 Regression]
                   |assignment and RESHAPE w/   |Wrong-code with realloc on
                   |ORDER=                      |assignment and RESHAPE w/
                   |                            |ORDER=

--- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-31 14:05:38 UTC ---
(In reply to comment #9)
> No longer a regression however.

Well, first, you didn't commit the patch to the 4.6 branch.

Secondly, I believe the following program still prints a different result with
GCC 4.1 to 4.5 than with 4.6 and 4.7, unless -fno-realloc-lhs is used:


integer, allocatable :: a(:), b(:)
allocate(b(3))
b = [1,2,3]

allocate (a(7:9))
a = reshape( b, shape=[size(b)])
print *, lbound(a), ubound(a) ! Expected: 7 9

end


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

* [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment and RESHAPE w/ ORDER=
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2012-01-31 14:32 ` [Bug fortran/52012] [4.6/4.7 Regression] " burnus at gcc dot gnu.org
@ 2012-02-02 21:20 ` pault at gcc dot gnu.org
  2012-02-03 18:35 ` pault at gcc dot gnu.org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pault at gcc dot gnu.org @ 2012-02-02 21:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Paul Thomas <pault at gcc dot gnu.org> 2012-02-02 21:20:19 UTC ---
Author: pault
Date: Thu Feb  2 21:20:14 2012
New Revision: 183849

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183849
Log:
2012-02-02  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/52012
    * trans-expr.c (fcncall_realloc_result): If variable shape is
    correct, retain the bounds, whatever they are.

2012-02-02  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/52012
    * gfortran.dg/realloc_on_assign_11.f90: New test.

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


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

* [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment and RESHAPE w/ ORDER=
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2012-02-02 21:20 ` pault at gcc dot gnu.org
@ 2012-02-03 18:35 ` pault at gcc dot gnu.org
  2012-02-03 20:42 ` burnus at gcc dot gnu.org
  2012-02-03 20:44 ` burnus at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: pault at gcc dot gnu.org @ 2012-02-03 18:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Paul Thomas <pault at gcc dot gnu.org> 2012-02-03 18:34:04 UTC ---
Author: pault
Date: Fri Feb  3 18:33:58 2012
New Revision: 183874

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183874
Log:
2012-02-03  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/52012
    * trans-expr.c (fcncall_realloc_result): Correct calculation of
    result offset. If variable shape is correct, retain the bounds,
    whatever they are.

2012-02-03  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/52012
    * gfortran.dg/realloc_on_assign_10.f90: New test.
    * gfortran.dg/realloc_on_assign_11.f90: New test.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/gfortran.dg/realloc_on_assign_10.f90
    branches/gcc-4_6-branch/gcc/testsuite/gfortran.dg/realloc_on_assign_11.f90
Modified:
    branches/gcc-4_6-branch/gcc/fortran/ChangeLog
    branches/gcc-4_6-branch/gcc/fortran/trans-expr.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


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

* [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment and RESHAPE w/ ORDER=
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2012-02-03 18:35 ` pault at gcc dot gnu.org
@ 2012-02-03 20:42 ` burnus at gcc dot gnu.org
  2012-02-03 20:44 ` burnus at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-02-03 20:42 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sphirshman at yahoo dot com

--- Comment #13 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-03 20:41:32 UTC ---
*** Bug 52117 has been marked as a duplicate of this bug. ***


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

* [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment and RESHAPE w/ ORDER=
  2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2012-02-03 20:42 ` burnus at gcc dot gnu.org
@ 2012-02-03 20:44 ` burnus at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-02-03 20:44 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #14 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-03 20:42:25 UTC ---
FIXED on the trunk (4.7) and 4.6 branch.


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

end of thread, other threads:[~2012-02-03 20:44 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-26 23:14 [Bug fortran/52012] New: [4.6/4.7 Regression] Wrong-code with RESHAPE burnus at gcc dot gnu.org
2012-01-27  0:13 ` [Bug fortran/52012] " burnus at gcc dot gnu.org
2012-01-27  0:22 ` dominiq at lps dot ens.fr
2012-01-27  0:26 ` [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment burnus at gcc dot gnu.org
2012-01-27  9:27 ` rguenth at gcc dot gnu.org
2012-01-27 10:06 ` [Bug fortran/52012] [4.6/4.7 Regression] Wrong-code with realloc on assignment and RESHAPE w/ ORDER= burnus at gcc dot gnu.org
2012-01-27 10:54 ` jakub at gcc dot gnu.org
2012-01-30 22:21 ` pault at gcc dot gnu.org
2012-01-30 23:16 ` burnus at gcc dot gnu.org
2012-01-31  9:47 ` paul.richard.thomas at gmail dot com
2012-01-31 12:52 ` pault at gcc dot gnu.org
2012-01-31 12:56 ` [Bug fortran/52012] " pault at gcc dot gnu.org
2012-01-31 13:02 ` pault at gcc dot gnu.org
2012-01-31 14:32 ` [Bug fortran/52012] [4.6/4.7 Regression] " burnus at gcc dot gnu.org
2012-02-02 21:20 ` pault at gcc dot gnu.org
2012-02-03 18:35 ` pault at gcc dot gnu.org
2012-02-03 20:42 ` burnus at gcc dot gnu.org
2012-02-03 20:44 ` burnus 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).