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

            Bug ID: 113054
           Summary: [14 regressions] ODR warnings when building new SCCP
                    pass
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
                CC: fkastl at suse dot cz
  Target Milestone: ---

The new SCCP pass introduces some new -Wodr warnings:
```
[...]
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/gimple-ssa-sccopy.cc:121:
note: a field with different name is defined in another translation unit
  121 |   bool active; /* scc_discovery::compute_sccs () only considers a
subgraph of
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/graphds.h:35:8:
warning: type ‘struct vertex’ violates the C++ One Definition Rule [-Wodr]
   35 | struct vertex
      |        ^
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/gimple-ssa-sccopy.cc:119:
note: a different type is defined in another translation unit
  119 | struct vertex
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/graphds.h:37:22:
note: the first difference of corresponding definitions is field ‘pred’
   37 |   struct graph_edge *pred, *succ;
      |                      ^
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/gimple-ssa-sccopy.cc:121:
note: a field with different name is defined in another translation unit
  121 |   bool active; /* scc_discovery::compute_sccs () only considers a
subgraph of
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/graphds.h:35:
warning: type ‘struct vertex’ violates the C++ One Definition Rule [-Wodr]
   35 | struct vertex
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/gimple-ssa-sccopy.cc:119:
note: a different type is defined in another translation unit
  119 | struct vertex
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/graphds.h:37:
note: the first difference of corresponding definitions is field ‘pred’
   37 |   struct graph_edge *pred, *succ;
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/gimple-ssa-sccopy.cc:121:
note: a field with different name is defined in another translation unit
  121 |   bool active; /* scc_discovery::compute_sccs () only considers a
subgraph of
[...]
```

Reply via email to