https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100001

            Bug ID: 100001
           Summary: [GCN offloading] Occasional C++
                    'libgomp.oacc-c-c++-common/static-variable-1.c'
                    execution failure
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: openacc
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
                CC: ams at gcc dot gnu.org, jules at gcc dot gnu.org
  Target Milestone: ---
            Target: gcn

My recent commit ffa0ae6eeef3ad15d3f288283e4c477193052f1a "Add
'libgomp.oacc-c-c++-common/static-variable-1.c' [PR84991, PR84992, PR90779]"
for 'libgomp.oacc-c' -- so far ;-) -- never but for 'libgomp.oacc-c++'
occasionally/"randomly" fails with GCN offloading, for '-O0' and/or '-O2'. 
It's certainly possible that something's wrong with my verification logic, but
in quite some testing why has the failure ever only shown up for the C++ but
never the C variant?  On the other hand, why is C++ behaving different from C
at all?  (I haven't spent any time on understanding that.)

A few examples of failures with GCN offloading:

    static-variable-1.exe:
[...]/libgomp/testsuite/libgomp.oacc-c++/../libgomp.oacc-c-c++-common/static-variable-1.c:355:
void t2(): Assertion `result_1_ == (((var_init_1 + num_gangs_actual_1 * (1 +
i)) * (1 + var_init_1 + num_gangs_actual_1 * (1 + i)) / 2) - ((var_init_1 +
num_gangs_actual_1 * (0 + i)) * (1 + var_init_1 + num_gangs_actual_1 * (0 + i))
/ 2))' failed.

    static-variable-1.exe:
[...]/libgomp/testsuite/libgomp.oacc-c++/../libgomp.oacc-c-c++-common/static-variable-1.c:368:
void t2(): Assertion `result_2_ == (((t2_var_init_2 + num_gangs_actual_2 * (1 +
i)) * (1 + t2_var_init_2 + num_gangs_actual_2 * (1 + i)) / 2) - ((t2_var_init_2
+ num_gangs_actual_2 * (0 + i)) * (1 + t2_var_init_2 + num_gangs_actual_2 * (0
+ i)) / 2))' failed.

    static-variable-1.exe:
[...]/libgomp/testsuite/libgomp.oacc-c++/../libgomp.oacc-c-c++-common/static-variable-1.c:381:
void t2(): Assertion `result_3_ == (((var_init_3 + num_gangs_actual_3 * (1 +
i)) * (1 + var_init_3 + num_gangs_actual_3 * (1 + i)) / 2) - ((var_init_3 +
num_gangs_actual_3 * (0 + i)) * (1 + var_init_3 + num_gangs_actual_3 * (0 + i))
/ 2))' failed.

I've -- so far ;-) -- not seen any failures with nvptx offloading.

Reply via email to