This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gomp] Expand empty parallel directives into empty statements


On Tue, Nov 01, 2005 at 01:17:28PM -0800, Richard Henderson wrote:
> On Tue, Nov 01, 2005 at 02:33:21PM -0500, Diego Novillo wrote:
> > Actually, it does say (2.8.3.3, p74, l8) "... This allocation occurs once 
> > for each thread in the team that references the list item in any statement 
> > in the the construct.".
> 
> Wow.  I so totally didn't expect that.  I suppose we should clarify
> this with the omp folk before relying on this...

If that would be mandated that only referenced vars get constructed,
it would complicate things for us, as fold will nuke some references
very early.
Consider:
struct A
{
  A ();
  ~A ();
  int x;
};
int
main ()
{
  A a;
  int i;
#pragma omp parallel private (a) shared (i)
  {
#pragma master
    i = a.x - a.x;
  }
  return i;
}
Plus questions on what exactly means reference (is mentioning it
in sizeof/__typeof/__alignof a reference?).

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]