[Bug fortran/33881] [4.3 Regression] incorrect code for optional assumed length character arrays ?

2007-10-26 Thread fxcoudert at gcc dot gnu dot org


--- Comment #9 from fxcoudert at gcc dot gnu dot org  2007-10-26 22:40 
---
And the smaller testcase with invalid dump:

  subroutine create_watch_ss (name,l)
character(len=*) :: name
logical l
if (l) then
  call create_watch_actual([name])
else
  call create_watch_actual([name])
end if
  end


-- 


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



[Bug fortran/33881] [4.3 Regression] incorrect code for optional assumed length character arrays ?

2007-10-26 Thread fxcoudert at gcc dot gnu dot org


--- Comment #8 from fxcoudert at gcc dot gnu dot org  2007-10-26 22:26 
---
Reduced-reduced testcase which still triggers valgrind:

  call create_watch_ss(" ")
contains
  subroutine create_watch_actual(name)
character(len=1) :: name(1)
  end subroutine create_watch_actual

  subroutine create_watch_ss(name,clock)
character(len=*) :: name
integer, optional :: clock
if (present(clock)) then
  call create_watch_actual((/name/))
else
  call create_watch_actual((/name/))
end if
  end subroutine create_watch_ss
end

It's apparent form the dump that, in the second branch of the IF, we use
variables declared in the first branch.


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |fxcoudert at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2007-10-26 07:17:07 |2007-10-26 22:26:14
   date||


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



[Bug fortran/33881] [4.3 Regression] incorrect code for optional assumed length character arrays ?

2007-10-26 Thread burnus at gcc dot gnu dot org


--- Comment #7 from burnus at gcc dot gnu dot org  2007-10-26 21:16 ---
Works: 2007-07-13-r126613
Fails: 2007-07-16-r126671


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu dot
   ||org
  Known to fail||4.3.0
  Known to work||4.2.2 4.1.3
Summary|incorrect code for optional |[4.3 Regression] incorrect
   |assumed length character|code for optional assumed
   |arrays ?|length character arrays ?


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