Ticket #92 (accepted defect)

Opened 11 years ago

Last modified 7 years ago

backtranslation of switch nested in loop reverses order

Reported by: Utke Owned by: utke
Priority: 2 Milestone:
Component: OpenADFortTK Keywords:
Cc:

Description (last modified by utke) (diff)

A simple switch statement that is the body of a loop
leads in the reversed control flow graph after backtranslation by xaif2whirl to a situation where the switch is translated into goto-label pairs and the end-switch label is placed AFTER the updated statement of the containing loop.
So, the update statement is never reached and the loops is infinite

Change History

Changed 10 years ago by Utke

sample code in
xaifBooster/testRoundTrip/examples/Select_2:

subroutine head(x,y)

double precision, dimension(3), intent(in)
x
double precision, dimension(3), intent(out)
y integer i

c$openad INDEPENDENT(x)

do i=1,3
select case (i)
case (1)

y(i)=sin(x(i))

case (2)

y(i)=cos(x(i))

case default

y(i)=2*x(i)

end select
end do

c$openad DEPENDENT(y)

end subroutine

Changed 7 years ago by utke

  • status changed from Assigned to new
  • description modified (diff)

Changed 7 years ago by utke

  • owner changed from Tallent to utke
  • status changed from new to accepted
Note: See TracTickets for help on using tickets.