public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/111254] New: Dodgy variable name (*_11 = PHI <_1(25), _25(23)>.CargoPacket::Pool...) in -Wmaybe-uninitialized
@ 2023-08-31  6:44 sjames at gcc dot gnu.org
  2023-08-31  6:46 ` [Bug middle-end/111254] " sjames at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-08-31  6:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111254
           Summary: Dodgy variable name (*_11 = PHI <_1(25),
                    _25(23)>.CargoPacket::Pool...) in
                    -Wmaybe-uninitialized
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 55824
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55824&action=edit
cargopacket.cpp.ii.xz

With 
gcc (Gentoo 14.0.0 p, commit d0b55776a4e1d2f293db5ba0e4a04aefed055ec4) 14.0.0
20230830 (experimental) c121afc3b6c96a1f229ba0c4a4de6bd4b6be9a53:
```
$ g++ -c cargopacket.cpp.ii -O2 -Wmaybe-uninitialized
[...]
In file included from
/var/tmp/portage/games-simulation/openttd-13.4/work/openttd-13.4/src/base_station_base.h:13:
In static member function ‘static void Pool<Titem, Tindex, Tgrowth_step,
Tmax_size, Tpool_type, Tcache, Tzero>::PoolItem<Tpool>::operator delete(void*)
[with Pool<Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero>*
Tpool = (& _cargopacket_pool); Titem = CargoPacket; Tindex = unsigned int; long
unsigned int Tgrowth_step = 1024; long unsigned int Tmax_size = 16773120;
PoolType Tpool_type = PT_NORMAL; bool Tcache = true; bool Tzero = false]’,
    inlined from ‘static void Pool<Titem, Tindex, Tgrowth_step, Tmax_size,
Tpool_type, Tcache, Tzero>::PoolItem<Tpool>::operator delete(void*) [with
Pool<Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero>* Tpool
= (& _cargopacket_pool); Titem = CargoPacket; Tindex = unsigned int; long
unsigned int Tgrowth_step = 1024; long unsigned int Tmax_size = 16773120;
PoolType Tpool_type = PT_NORMAL; bool Tcache = true; bool Tzero = false]’ at
/var/tmp/portage/games-simulation/openttd-13.4/work/openttd-13.4/src/core/pool_type.hpp:256:15,
    inlined from ‘void Pool<Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type,
Tcache, Tzero>::CleanPool() [with Titem = CargoPacket; Tindex = unsigned int;
long unsigned int Tgrowth_step = 1024; long unsigned int Tmax_size = 16773120;
PoolType Tpool_type = PT_NORMAL; bool Tcache = true; bool Tzero = false]’ at
/var/tmp/portage/games-simulation/openttd-13.4/work/openttd-13.4/src/core/pool_func.hpp:200:3:
/var/tmp/portage/games-simulation/openttd-13.4/work/openttd-13.4/src/core/pool_type.hpp:261:45:
warning: ‘*MEM[(struct CargoPacket * *)_13].CargoPacket::Pool<CargoPacket,
unsigned int, 1024, 16773120, PT_NORMAL, true, false>::PoolItem<(&
_cargopacket_pool)>.Pool<CargoPacket, unsigned int, 1024, 16773120, PT_NORMAL,
true, false>::PoolItem<(& _cargopacket_pool)>::index’ may be used uninitialized
[-Wmaybe-uninitialized]
  261 |                         Tpool->FreeItem(pn->index);
      |                                         ~~~~^~~~~
In static member function ‘static void Pool<Titem, Tindex, Tgrowth_step, Tmax_
[...]
```

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

* [Bug middle-end/111254] Dodgy variable name (*_11 = PHI <_1(25), _25(23)>.CargoPacket::Pool...) in -Wmaybe-uninitialized
  2023-08-31  6:44 [Bug middle-end/111254] New: Dodgy variable name (*_11 = PHI <_1(25), _25(23)>.CargoPacket::Pool...) in -Wmaybe-uninitialized sjames at gcc dot gnu.org
@ 2023-08-31  6:46 ` sjames at gcc dot gnu.org
  2023-08-31  8:08 ` sjames at gcc dot gnu.org
  2023-08-31 11:14 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-08-31  6:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Sam James <sjames at gcc dot gnu.org> ---
I have a few more of these in clang and qt* but I figure this is a smaller test
case. Can report the others if needed though.

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

* [Bug middle-end/111254] Dodgy variable name (*_11 = PHI <_1(25), _25(23)>.CargoPacket::Pool...) in -Wmaybe-uninitialized
  2023-08-31  6:44 [Bug middle-end/111254] New: Dodgy variable name (*_11 = PHI <_1(25), _25(23)>.CargoPacket::Pool...) in -Wmaybe-uninitialized sjames at gcc dot gnu.org
  2023-08-31  6:46 ` [Bug middle-end/111254] " sjames at gcc dot gnu.org
@ 2023-08-31  8:08 ` sjames at gcc dot gnu.org
  2023-08-31 11:14 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-08-31  8:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Sam James <sjames at gcc dot gnu.org> ---
sorry, wrong output:
```
[...]
In static member function ‘static void Pool<Titem, Tindex, Tgrowth_step,
Tmax_size, Tpool_type, Tcache, Tzero>::PoolItem<Tpool>::operator delete(void*)
[with Pool<Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero>*
Tpool = (& _cargopacket_pool); Titem = CargoPacket; Tindex = unsigned int; long
unsigned int Tgrowth_step = 1024; long unsigned int Tmax_size = 16773120;
PoolType Tpool_type = PT_NORMAL; bool Tcache = true; bool Tzero = false]’,
    inlined from ‘static void Pool<Titem, Tindex, Tgrowth_step, Tmax_size,
Tpool_type, Tcache, Tzero>::PoolItem<Tpool>::operator delete(void*) [with
Pool<Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero>* Tpool
= (& _cargopacket_pool); Titem = CargoPacket; Tindex = unsigned int; long
unsigned int Tgrowth_step = 1024; long unsigned int Tmax_size = 16773120;
PoolType Tpool_type = PT_NORMAL; bool Tcache = true; bool Tzero = false]’ at
/var/tmp/portage/games-simulation/openttd-13.4/work/openttd-13.4/src/core/pool_type.hpp:256:15,
    inlined from ‘CargoList<Tinst, Tcont>::~CargoList() [with Tinst =
StationCargoList; Tcont = MultiMap<short unsigned int, CargoPacket*>]’ at
/var/tmp/portage/games-simulation/openttd-13.4/work/openttd-13.4/src/cargopacket.cpp:158:3:
/var/tmp/portage/games-simulation/openttd-13.4/work/openttd-13.4/src/core/pool_type.hpp:261:45:
warning: ‘*_56 = PHI <_27(25), _7(23)>.CargoPacket::Pool<CargoPacket, unsigned
int, 1024, 16773120, PT_NORMAL, true, false>::PoolItem<(&
_cargopacket_pool)>.Pool<CargoPacket, unsigned int, 1024, 16773120, PT_NORMAL,
true, false>::PoolItem<(& _cargopacket_pool)>::index’ may be used uninitialized
[-Wmaybe-uninitialized]
  261 |                         Tpool->FreeItem(pn->index);
      |                                         ~~~~^~~~~
[...]
```

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

* [Bug middle-end/111254] Dodgy variable name (*_11 = PHI <_1(25), _25(23)>.CargoPacket::Pool...) in -Wmaybe-uninitialized
  2023-08-31  6:44 [Bug middle-end/111254] New: Dodgy variable name (*_11 = PHI <_1(25), _25(23)>.CargoPacket::Pool...) in -Wmaybe-uninitialized sjames at gcc dot gnu.org
  2023-08-31  6:46 ` [Bug middle-end/111254] " sjames at gcc dot gnu.org
  2023-08-31  8:08 ` sjames at gcc dot gnu.org
@ 2023-08-31 11:14 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-08-31 11:14 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
duplicate.

*** This bug has been marked as a duplicate of bug 111253 ***

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

end of thread, other threads:[~2023-08-31 11:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-31  6:44 [Bug middle-end/111254] New: Dodgy variable name (*_11 = PHI <_1(25), _25(23)>.CargoPacket::Pool...) in -Wmaybe-uninitialized sjames at gcc dot gnu.org
2023-08-31  6:46 ` [Bug middle-end/111254] " sjames at gcc dot gnu.org
2023-08-31  8:08 ` sjames at gcc dot gnu.org
2023-08-31 11:14 ` rguenth 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).