Bug 30167 - OpenMP can produce invalid gimple (for indirect references)
Summary: OpenMP can produce invalid gimple (for indirect references)
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: 30142
  Show dependency treegraph
 
Reported: 2006-12-12 07:36 UTC by Andrew Pinski
Modified: 2006-12-15 08:22 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2006-12-12 07:36:59 UTC
Fortran Testcase:
      SUBROUTINE A13( X, XOLD, N, TOL )
!$OMP PARALLEL
        DO WHILE( TOOBIG > 0 )
!$OMP MASTER
            PRINT *, "Iteration ", C, " TOOBIG=", TOOBIG
!$OMP END MASTER
        ENDDO
!$OMP END PARALLEL
      END SUBROUTINE A12

----------------
We get:
  D.1056 = *(.omp_data_i->toobig);
Which is obviously not gimple.
Again the testcase in PR 30142 is used to test for this.
Comment 1 Andrew Pinski 2006-12-12 07:40:09 UTC
This testcase is from gfortran.dg/gomp/appendix-a/a.12.1.f90.
Comment 2 Andrew Pinski 2006-12-12 08:44:31 UTC
Here is another testcase (a C one this time):
int x, *p = &x;
g (int n)
{
  int i = 1, j, sum = 0;
#pragma omp parallel reduction(+: sum) num_threads(2)
  {
    f1 (&j);
    sum += i + j + *p + n;
  }
}
Comment 3 Andrew Pinski 2006-12-15 08:22:33 UTC
Actually never mind, this is caused by my patch to fix PR 30143.