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: Type comparing TLC


Hi!

On Wed, 18 Feb 2015 17:17:08 +0100, Jan Hubicka <hubicka@ucw.cz> wrote:
> looking across the ODR violation messages in libreoffice and Chromium I found
> some false positives and some confused messages.  This patch fixes them. In partiuclar
>  - I introduced nasty vtable corruption when breaking out my type merging patches,
>    so we ended up creating separate entries for each copy of type without BINFO :(
>  - C++ now allows to use enum that has no fields defined. Those needs to match enums
>    with fields from other unit
>  - class and vtable layout diffing got confused by presence of extra vptr pointers
>    and bases. Fixed thus.
> 
> Bootstrapped/regtested x86_64-linux, comitted.

> 	* 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:

    [-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)
                 ^
    [...]


GrÃÃe,
 Thomas

Attachment: signature.asc
Description: PGP signature


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