[Bug fortran/69268] [5 Regression] Sourced allocation calls function twice

2016-02-03 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69268

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from vehre at gcc dot gnu.org ---
No complaints so far closing as fixed.

[Bug fortran/69268] [5 Regression] Sourced allocation calls function twice

2016-01-31 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69268

--- Comment #6 from vehre at gcc dot gnu.org ---
I am waiting for one week to pass without complaints before closing the pr as
resolved fixed to prevent resolved -> reopened cycles. Will mark as resolved ->
fixed on Feb. 3,. Sorry for not communicating more precisely.

[Bug fortran/69268] [5 Regression] Sourced allocation calls function twice

2016-01-31 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69268

--- Comment #5 from janus at gcc dot gnu.org ---
Anything left to do here? Is there a particular reason the status is "WAITING"?
What are we waiting for?

[Bug fortran/69268] [5 Regression] Sourced allocation calls function twice

2016-01-27 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69268

--- Comment #4 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Wed Jan 27 14:48:04 2016
New Revision: 232876

URL: https://gcc.gnu.org/viewcvs?rev=232876=gcc=rev
Log:
gcc/testsuite/ChangeLog:

2016-01-27  Andre Vehreschild  

PR fortran/69268
* gfortran.dg/allocatable_scalar_13.f90: Fixing counts of malloc/
free to fit the actual number of calls.
* gfortran.dg/allocate_with_source_16.f90: New test.


gcc/fortran/ChangeLog:

2016-01-27  Andre Vehreschild  

PR fortran/69268
* trans-stmt.c (gfc_trans_allocate): Make sure the source=
expression is evaluated once only. Use gfc_trans_assignment ()
instead of explicitly calling gfc_trans_string_copy () to
reduce the code complexity in trans_allocate.


Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/allocate_with_source_16.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/trans-stmt.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/allocatable_scalar_13.f90

[Bug fortran/69268] [5 Regression] Sourced allocation calls function twice

2016-01-27 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69268

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |WAITING

[Bug fortran/69268] [5 Regression] Sourced allocation calls function twice

2016-01-26 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69268

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |vehre at gcc dot gnu.org

[Bug fortran/69268] [5 Regression] Sourced allocation calls function twice

2016-01-26 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69268

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #2 from vehre at gcc dot gnu.org ---
Patch proposed in:

https://gcc.gnu.org/ml/fortran/2016-01/msg00080.html

Awaiting approval/comments.

[Bug fortran/69268] [5 Regression] Sourced allocation calls function twice

2016-01-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69268

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|WAITING |NEW
   Target Milestone|--- |5.4

[Bug fortran/69268] [5 Regression] Sourced allocation calls function twice

2016-01-26 Thread townsend at astro dot wisc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69268

--- Comment #3 from Rich Townsend  ---
Proposed patch appears to work in the real-world case I'm focused on. Thanks!

[Bug fortran/69268] [5 Regression] Sourced allocation calls function twice

2016-01-14 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69268

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-14
 CC||vehre at gcc dot gnu.org
  Known to work||4.9.3, 6.0
Summary|Sourced allocation calls|[5 Regression] Sourced
   |function twice  |allocation calls function
   ||twice
 Ever confirmed|0   |1
  Known to fail||5.3.0

--- Comment #1 from Dominique d'Humieres  ---
> I believe this may gave been fixed in 6.0, but 5.3 seems to still have the 
> problem.

Likely fixed on trunk by revision r229294. The function is called only once
with 4.8 and 4.9 and up to revision r221412, but called twice with r221464
(+patches), likely r221436.