Created attachment 54082 [details] build.log.xz (slightly past warning) Noticed when bootstrapping GCC 13 from trunk at r13-4681-g531ca06c007d4c. ``` /var/tmp/portage/sys-devel/gcc-13.0.9999/work/gcc-13.0.9999/gcc/rust/rust-lang.cc:67:17: warning: type [-Wodr] 67 | struct GTY (()) lang_type | ^ /var/tmp/portage/sys-devel/gcc-13.0.9999/work/gcc-13.0.9999/gcc/rust/backend/rust-tree.h:234: note: a different type is defined in another translation unit 234 | struct GTY (()) lang_type | /var/tmp/portage/sys-devel/gcc-13.0.9999/work/gcc-13.0.9999/gcc/rust/backend/rust-tree.h:236: note: the first difference of corresponding definitions is field ‘align’ 236 | unsigned char align; | /var/tmp/portage/sys-devel/gcc-13.0.9999/work/gcc-13.0.9999/gcc/rust/backend/rust-tree.h:234: note: a type with different number of fields is defined in another translation unit 234 | struct GTY (()) lang_type | ``` I've attached the build.log compressed a bit past the point of the warning, as it's still building. Host compiler is 12.2.1_p20221210.
Sorry, output got mangled slightly by ansifiltering: ``` /var/tmp/portage/sys-devel/gcc-13.0.9999/work/gcc-13.0.9999/gcc/rust/rust-lang.cc:67:17: warning: type ‘struct lang_type’ violates the C++ One Definition Rule [-Wodr] 67 | struct GTY (()) lang_type | ^ /var/tmp/portage/sys-devel/gcc-13.0.9999/work/gcc-13.0.9999/gcc/rust/backend/rust-tree.h:234: note: a different type is defined in another translation unit 234 | struct GTY (()) lang_type | /var/tmp/portage/sys-devel/gcc-13.0.9999/work/gcc-13.0.9999/gcc/rust/backend/rust-tree.h:236: note: the first difference of corresponding definitions is field ‘align’ 236 | unsigned char align; | /var/tmp/portage/sys-devel/gcc-13.0.9999/work/gcc-13.0.9999/gcc/rust/backend/rust-tree.h:234: note: a type with different number of fields is defined in another translation unit 234 | struct GTY (()) lang_type | ```
This does look like a real issue in the rust front-end. lang_type is defined differently in those two files.
Yes, I think it's a real issue.
Thanks everyone, this is indeed a real issue and a mishap on our part. It's due to our const evaluator, which was ported over from the C++ frontend, defining another lang_type struct similar to what is the C++ one. I'm working on fixing it. I've opened up https://github.com/Rust-GCC/gccrs/issues/1702 and will report progress
I think this was fixed by https://github.com/Rust-GCC/gccrs/pull/2586 -> r14-7947-g9048f08f4e9459.