On Fri, Feb 20, 2015 at 02:15:24PM +0100, Thomas Schwinge wrote:
> >     * ipa-devirt.c (odr_subtypes_equivalent_p): Fix formating.
> >     (compare_virtual_tables): Be smarter about skipping typeinfos;
> >     do sane output on virtual table table mismatch.
> >     (warn_odr): Be ready for forward declarations of enums;
> >     output sane info on base mismatch and virtual table mismatch.
> >     (add_type_duplicate): Fix code choosing prevailing type; do not ICE
> >     when only one type is polymorphic.
> >     (get_odr_type): Fix hashtable corruption.
> >     (dump_odr_type): Dump mangled names.
> 
> I find this commit, r220790, cause the following regression in an
> offloading-enabled configuration:

I'd think that we shouldn't report ODR violations for types with
DECL_ARTIFICIAL (or just DECL_NAMELESS?) TYPE_DECLs.
Especially the DECL_NAMELESS ones have names just for debugging purposes.
> 
>     [-PASS:-]{+FAIL:+} libgomp.c++/target-3.C (test for excess errors)
>     PASS: libgomp.c++/target-3.C execution test
> 
>     [...]/build-gcc/gcc/xgcc -B[...]/build-gcc/gcc/ 
> [...]/source-gcc/libgomp/testsuite/libgomp.c++/target-3.C 
> -B[...]/build-gcc/x86_64-unknown-linux-gnu/./libgomp/ 
> -B[...]/build-gcc/x86_64-unknown-linux-gnu/./libgomp/.libs 
> -I[...]/build-gcc/x86_64-unknown-linux-gnu/./libgomp 
> -I[...]/source-gcc/libgomp/testsuite/../../include 
> -I[...]/source-gcc/libgomp/testsuite/.. 
> -I/usr/local/cuda-5.5/targets/x86_64-linux/include -fmessage-length=0 
> -fno-diagnostics-show-caret -fdiagnostics-color=never 
> -B[...]/install/offload-nvptx-none/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0 
> -B[...]/install/offload-nvptx-none/bin 
> -B[...]/install/offload-x86_64-intelmicemul-linux-gnu/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0
>  -B[...]/install/offload-x86_64-intelmicemul-linux-gnu/bin -fopenmp 
> -nostdinc++ 
> -I[...]/build-gcc/x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu
>  -I[...]/build-gcc/x86_64-unknown-linux-gnu/libstdc++-v3/include 
> -I[...]/source-gcc/libstdc++-v3/libsupc++ 
> -I[...]/source-gcc/libstdc++-v3/include/backward 
> -I[...]/source-gcc/libstdc++-v3/testsuite/util 
> -B[...]/build-gcc/x86_64-unknown-linux-gnu/./libgomp/../libstdc++-v3/src/.libs
>  -L[...]/build-gcc/x86_64-unknown-linux-gnu/./libgomp/.libs 
> -L[...]/build-gcc/x86_64-unknown-linux-gnu/./libgomp/../libstdc++-v3/src/.libs
>  -lstdc++ -lm -o ./target-3.exe
>     
> [...]/source-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)
>                  ^
>     
> [...]/source-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)
>                  ^
>     
> [...]/source-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];
>                      ^
>     
> [...]/source-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];
>                      ^
>     
> [...]/source-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)
>                  ^
>     [...]

        Jakub

Reply via email to