On Mon, Mar 30, 2015 at 19:06:39 +0200, Jan Hubicka wrote:
> > On Mon, Mar 30, 2015 at 05:02:57 +0200, Jan Hubicka wrote:
> > >   * lto-symtab.c (lto_symtab_merge_decls_2): Silence warnings on
> > >   artificial decls.
> > 
> > Shouldn't this patch fix libgomp.c++/target-3.C in an offloading-enabled
> > configuration?  It still fails...
> > 
> > libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:27:13: warning: type 
> > 'struct .omp_data_s.7' violates one definition rule [-Wodr]
> >      #pragma omp parallel for reduction(+:s)
> >              ^
> >      #pragma omp parallel for reduction(+:s)
> >              ^
> >    double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
> >                  ^
> >    double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
> >                  ^
> 
> No, that is an different warning.  Why those types are different? Is this a 
> full warning output?

Here is full output:

spawn -ignore SIGHUP /gcc_build_host/gcc/xgcc -B/gcc_build_host/gcc/ 
/gcc/libgomp/testsuite/libgomp.c++/target-3.C 
-B/gcc_build_host/x86_64-pc-linux-gnu/./libgomp/ 
-B/gcc_build_host/x86_64-pc-linux-gnu/./libgomp/.libs 
-I/gcc_build_host/x86_64-pc-linux-gnu/./libgomp 
-I/gcc/libgomp/testsuite/../../include -I/gcc/libgomp/testsuite/.. 
-fmessage-length=0 -fno-diagnostics-show-caret -fdiagnostics-color=never 
-B/gcc_install/usr/local//libexec/gcc/x86_64-pc-linux-gnu/5.0.0 
-B/gcc_install/usr/local//gcc -B/gcc_install/usr/local//bin -fopenmp 
-nostdinc++ 
-I/gcc_build_host/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu 
-I/gcc_build_host/x86_64-pc-linux-gnu/libstdc++-v3/include 
-I/gcc/libstdc++-v3/libsupc++ -I/gcc/libstdc++-v3/include/backward 
-I/gcc/libstdc++-v3/testsuite/util 
-B/gcc_build_host/x86_64-pc-linux-gnu/./libgomp/../libstdc++-v3/src/.libs 
-L/gcc_build_host/x86_64-pc-linux-gnu/./libgomp/.libs 
-L/gcc_build_host/x86_64-pc-linux-gnu/./libgomp/../libstdc++-v3/src/.libs 
-lstdc++ -lm -o ./target-3.exe
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:27:13: warning: type 
'struct .omp_data_s.7' violates one definition rule [-Wodr]
     #pragma omp parallel for reduction(+:s)
             ^
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:27:13: note: a 
different type is defined in another translation unit
     #pragma omp parallel for reduction(+:s)
             ^
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:22:17: note: the 
first difference of corresponding definitions is field 'b.0'
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:22:17: note: a field 
of same name but different type is defined in another translation unit
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
lto1: note: array types have different bounds
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:42:13: warning: type 
'struct .omp_data_s.20' violates one definition rule [-Wodr]
     #pragma omp parallel for reduction(+:s)
             ^
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:42:13: note: a 
different type is defined in another translation unit
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:37:17: note: the 
first difference of corresponding definitions is field 'b.14'
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:37:17: note: a field 
of same name but different type is defined in another translation unit
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
lto1: note: array types have different bounds
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:60:10: warning: type 
'struct .omp_data_s.38' violates one definition rule [-Wodr]
  #pragma omp parallel for reduction(+:s)
          ^
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:60:10: note: a 
different type is defined in another translation unit
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:52:17: note: the 
first difference of corresponding definitions is field 'b.27'
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:52:17: note: a field 
of same name but different type is defined in another translation unit
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
lto1: note: array types have different bounds
output is:
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:27:13: warning: type 
'struct .omp_data_s.7' violates one definition rule [-Wodr]
     #pragma omp parallel for reduction(+:s)
             ^
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:27:13: note: a 
different type is defined in another translation unit
     #pragma omp parallel for reduction(+:s)
             ^
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:22:17: note: the 
first difference of corresponding definitions is field 'b.0'
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:22:17: note: a field 
of same name but different type is defined in another translation unit
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
lto1: note: array types have different bounds
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:42:13: warning: type 
'struct .omp_data_s.20' violates one definition rule [-Wodr]
     #pragma omp parallel for reduction(+:s)
             ^
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:42:13: note: a 
different type is defined in another translation unit
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:37:17: note: the 
first difference of corresponding definitions is field 'b.14'
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:37:17: note: a field 
of same name but different type is defined in another translation unit
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
lto1: note: array types have different bounds
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:60:10: warning: type 
'struct .omp_data_s.38' violates one definition rule [-Wodr]
  #pragma omp parallel for reduction(+:s)
          ^
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:60:10: note: a 
different type is defined in another translation unit
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:52:17: note: the 
first difference of corresponding definitions is field 'b.27'
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:52:17: note: a field 
of same name but different type is defined in another translation unit
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
lto1: note: array types have different bounds

FAIL: libgomp.c++/target-3.C (test for excess errors)
Excess errors:
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:27:13: warning: type 
'struct .omp_data_s.7' violates one definition rule [-Wodr]
     #pragma omp parallel for reduction(+:s)
             ^
     #pragma omp parallel for reduction(+:s)
             ^
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:42:13: warning: type 
'struct .omp_data_s.20' violates one definition rule [-Wodr]
     #pragma omp parallel for reduction(+:s)
             ^
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
/gcc/libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:60:10: warning: type 
'struct .omp_data_s.38' violates one definition rule [-Wodr]
  #pragma omp parallel for reduction(+:s)
          ^
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^
   double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
                 ^

  -- Ilya

Reply via email to