public inbox for gcc-rust@gcc.gnu.org
 help / color / mirror / Atom feed
* [Bug rust/108087] New: -Wodr warnings in rust/rust-lang.cc (lang_type)
@ 2022-12-13 18:44 sam at gentoo dot org
  2022-12-13 18:45 ` [Bug rust/108087] " sam at gentoo dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: sam at gentoo dot org @ 2022-12-13 18:44 UTC (permalink / raw)
  To: gcc-rust

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

            Bug ID: 108087
           Summary: -Wodr warnings in rust/rust-lang.cc (lang_type)
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rust
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sam at gentoo dot org
                CC: dkm at gcc dot gnu.org, gcc-rust at gcc dot gnu.org
  Target Milestone: ---

Created attachment 54082
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54082&action=edit
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rust/108087] -Wodr warnings in rust/rust-lang.cc (lang_type)
  2022-12-13 18:44 [Bug rust/108087] New: -Wodr warnings in rust/rust-lang.cc (lang_type) sam at gentoo dot org
@ 2022-12-13 18:45 ` sam at gentoo dot org
  2022-12-13 18:46 ` sam at gentoo dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: sam at gentoo dot org @ 2022-12-13 18:45 UTC (permalink / raw)
  To: gcc-rust

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

--- Comment #1 from Sam James <sam at gentoo dot org> ---
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
      |
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rust/108087] -Wodr warnings in rust/rust-lang.cc (lang_type)
  2022-12-13 18:44 [Bug rust/108087] New: -Wodr warnings in rust/rust-lang.cc (lang_type) sam at gentoo dot org
  2022-12-13 18:45 ` [Bug rust/108087] " sam at gentoo dot org
@ 2022-12-13 18:46 ` sam at gentoo dot org
  2022-12-13 19:02 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: sam at gentoo dot org @ 2022-12-13 18:46 UTC (permalink / raw)
  To: gcc-rust

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

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
               Host|                            |x86_64-pc-linux-gnu

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rust/108087] -Wodr warnings in rust/rust-lang.cc (lang_type)
  2022-12-13 18:44 [Bug rust/108087] New: -Wodr warnings in rust/rust-lang.cc (lang_type) sam at gentoo dot org
  2022-12-13 18:45 ` [Bug rust/108087] " sam at gentoo dot org
  2022-12-13 18:46 ` sam at gentoo dot org
@ 2022-12-13 19:02 ` pinskia at gcc dot gnu.org
  2022-12-14  8:49 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-13 19:02 UTC (permalink / raw)
  To: gcc-rust

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This does look like a real issue in the rust front-end.
lang_type is defined differently in those two files.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rust/108087] -Wodr warnings in rust/rust-lang.cc (lang_type)
  2022-12-13 18:44 [Bug rust/108087] New: -Wodr warnings in rust/rust-lang.cc (lang_type) sam at gentoo dot org
                   ` (2 preceding siblings ...)
  2022-12-13 19:02 ` pinskia at gcc dot gnu.org
@ 2022-12-14  8:49 ` marxin at gcc dot gnu.org
  2022-12-14  9:44 ` arthur.cohen at embecosm dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-12-14  8:49 UTC (permalink / raw)
  To: gcc-rust

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |marxin at gcc dot gnu.org
   Last reconfirmed|                            |2022-12-14
     Ever confirmed|0                           |1

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Yes, I think it's a real issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rust/108087] -Wodr warnings in rust/rust-lang.cc (lang_type)
  2022-12-13 18:44 [Bug rust/108087] New: -Wodr warnings in rust/rust-lang.cc (lang_type) sam at gentoo dot org
                   ` (3 preceding siblings ...)
  2022-12-14  8:49 ` marxin at gcc dot gnu.org
@ 2022-12-14  9:44 ` arthur.cohen at embecosm dot com
  2022-12-14 14:52 ` cohenarthur at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: arthur.cohen at embecosm dot com @ 2022-12-14  9:44 UTC (permalink / raw)
  To: gcc-rust

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

Arthur Cohen <arthur.cohen at embecosm dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arthur.cohen at embecosm dot com

--- Comment #4 from Arthur Cohen <arthur.cohen at embecosm dot com> ---
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

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rust/108087] -Wodr warnings in rust/rust-lang.cc (lang_type)
  2022-12-13 18:44 [Bug rust/108087] New: -Wodr warnings in rust/rust-lang.cc (lang_type) sam at gentoo dot org
                   ` (4 preceding siblings ...)
  2022-12-14  9:44 ` arthur.cohen at embecosm dot com
@ 2022-12-14 14:52 ` cohenarthur at gcc dot gnu.org
  2022-12-14 14:53 ` cohenarthur at gcc dot gnu.org
  2022-12-14 14:59 ` tschwinge at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cohenarthur at gcc dot gnu.org @ 2022-12-14 14:52 UTC (permalink / raw)
  To: gcc-rust

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

Arthur Cohen <cohenarthur at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cohenarthur at gcc dot gnu.org
           See Also|                            |https://github.com/Rust-GCC
                   |                            |/gccrs/issues/1702

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rust/108087] -Wodr warnings in rust/rust-lang.cc (lang_type)
  2022-12-13 18:44 [Bug rust/108087] New: -Wodr warnings in rust/rust-lang.cc (lang_type) sam at gentoo dot org
                   ` (5 preceding siblings ...)
  2022-12-14 14:52 ` cohenarthur at gcc dot gnu.org
@ 2022-12-14 14:53 ` cohenarthur at gcc dot gnu.org
  2022-12-14 14:59 ` tschwinge at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cohenarthur at gcc dot gnu.org @ 2022-12-14 14:53 UTC (permalink / raw)
  To: gcc-rust

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

Arthur Cohen <cohenarthur at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug rust/108087] -Wodr warnings in rust/rust-lang.cc (lang_type)
  2022-12-13 18:44 [Bug rust/108087] New: -Wodr warnings in rust/rust-lang.cc (lang_type) sam at gentoo dot org
                   ` (6 preceding siblings ...)
  2022-12-14 14:53 ` cohenarthur at gcc dot gnu.org
@ 2022-12-14 14:59 ` tschwinge at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2022-12-14 14:59 UTC (permalink / raw)
  To: gcc-rust

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

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |cohenarthur at gcc dot gnu.org
                 CC|                            |tschwinge at gcc dot gnu.org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-12-14 14:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-13 18:44 [Bug rust/108087] New: -Wodr warnings in rust/rust-lang.cc (lang_type) sam at gentoo dot org
2022-12-13 18:45 ` [Bug rust/108087] " sam at gentoo dot org
2022-12-13 18:46 ` sam at gentoo dot org
2022-12-13 19:02 ` pinskia at gcc dot gnu.org
2022-12-14  8:49 ` marxin at gcc dot gnu.org
2022-12-14  9:44 ` arthur.cohen at embecosm dot com
2022-12-14 14:52 ` cohenarthur at gcc dot gnu.org
2022-12-14 14:53 ` cohenarthur at gcc dot gnu.org
2022-12-14 14:59 ` tschwinge at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).