public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/99989] New: [11 regression] False maybe-uninitialized warning breaks bootstrap on riscv64
@ 2021-04-09 10:16 schwab@linux-m68k.org
  2021-04-09 10:17 ` [Bug middle-end/99989] " schwab@linux-m68k.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: schwab@linux-m68k.org @ 2021-04-09 10:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99989
           Summary: [11 regression] False maybe-uninitialized warning
                    breaks bootstrap on riscv64
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: schwab@linux-m68k.org
                CC: hubicka at gcc dot gnu.org
            Blocks: 24639, 98265
  Target Milestone: ---
            Target: riscv64-*-*

In function ‘alloca_type_and_limit alloca_call_type(range_query&, gimple*, bool
’,
    inlined from ‘virtual unsigned int pass_walloca::execute(function*)’ at
../../gcc/gimple-ssa-warn-alloca.c:295:25:
../../gcc/gimple-ssa-warn-alloca.c:206:13: error: ‘*(long int*)((char*)&ret +
offsetof(alloca_type_and_limit,
alloca_type_and_limit::limit.generic_wide_int<wide_int_storage>::<unnamed>.wide_int_storage::val[0]))’
may be used uninitialized  -Werror=maybe-uninitialized]
  206 |         ret = alloca_type_and_limit (ALLOCA_OK);
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc/gimple-ssa-warn-alloca.c: In member function ‘virtual unsigned int
pass_walloca::execute(function*)’:
../../gcc/gimple-ssa-warn-alloca.c:200:32: note: ‘ret’ declared here
  200 |   struct alloca_type_and_limit ret = alloca_type_and_limit (ALLOCA_OK);
      |                                ^~~
In function ‘alloca_type_and_limit alloca_call_type(range_query&, gimple*, bool
’,
    inlined from ‘virtual unsigned int pass_walloca::execute(function*)’ at
../../gcc/gimple-ssa-warn-alloca.c:295:25:
../../gcc/gimple-ssa-warn-alloca.c:206:13: error: ‘*(long int*)((char*)&ret +
offsetof(alloca_type_and_limit,
alloca_type_and_limit::limit.generic_wide_int<wide_int_storage>::<unnamed>.wide_int_storage::val[1]))’
may be used uninitialized  -Werror=maybe-uninitialized]
  206 |         ret = alloca_type_and_limit (ALLOCA_OK);
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc/gimple-ssa-warn-alloca.c: In member function ‘virtual unsigned int
pass_walloca::execute(function*)’:
../../gcc/gimple-ssa-warn-alloca.c:200:32: note: ‘ret’ declared here
  200 |   struct alloca_type_and_limit ret = alloca_type_and_limit (ALLOCA_OK);
      |                                ^~~
In function ‘alloca_type_and_limit alloca_call_type(range_query&, gimple*, bool
’,
    inlined from ‘virtual unsigned int pass_walloca::execute(function*)’ at
../../gcc/gimple-ssa-warn-alloca.c:295:25:
../../gcc/gimple-ssa-warn-alloca.c:206:13: error: ‘*(long int*)((char*)&ret +
offsetof(alloca_type_and_limit,
alloca_type_and_limit::limit.generic_wide_int<wide_int_storage>::<unnamed>.wide_int_storage::val[2]))’
may be used uninitialized  -Werror=maybe-uninitialized]
  206 |         ret = alloca_type_and_limit (ALLOCA_OK);
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc/gimple-ssa-warn-alloca.c: In member function ‘virtual unsigned int
pass_walloca::execute(function*)’:
../../gcc/gimple-ssa-warn-alloca.c:200:32: note: ‘ret’ declared here
  200 |   struct alloca_type_and_limit ret = alloca_type_and_limit (ALLOCA_OK);
      |                                ^~~
In function ‘alloca_type_and_limit alloca_call_type(range_query&, gimple*, bool
’,
    inlined from ‘virtual unsigned int pass_walloca::execute(function*)’ at
../../gcc/gimple-ssa-warn-alloca.c:295:25:
../../gcc/gimple-ssa-warn-alloca.c:206:13: error: ‘*(unsigned int*)((char*)&ret
+ offsetof(alloca_type_and_limit,
alloca_type_and_limit::limit.generic_wide_int<wide_int_storage>::<unnamed>.wide_int_storage::len))’
may be used uninitialized [-Werror=maybe-uninitialized]
  206 |         ret = alloca_type_and_limit (ALLOCA_OK);
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc/gimple-ssa-warn-alloca.c: In member function ‘virtual unsigned int
pass_walloca::execute(function*)’:
../../gcc/gimple-ssa-warn-alloca.c:200:32: note: ‘ret’ declared here
  200 |   struct alloca_type_and_limit ret = alloca_type_and_limit (ALLOCA_OK);
      |                                ^~~
In function ‘alloca_type_and_limit alloca_call_type(range_query&, gimple*, bool
’,
    inlined from ‘virtual unsigned int pass_walloca::execute(function*)’ at
../../gcc/gimple-ssa-warn-alloca.c:295:25:
../../gcc/gimple-ssa-warn-alloca.c:206:13: error: ‘*(unsigned int*)((char*)&ret
+ offsetof(alloca_type_and_limit,
alloca_type_and_limit::limit.generic_wide_int<wide_int_storage>::<unnamed>.wide_int_storage::precision))’
may be used uninitialized [-Werror=maybe-uninitialized]
  206 |         ret = alloca_type_and_limit (ALLOCA_OK);
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc/gimple-ssa-warn-alloca.c: In member function ‘virtual unsigned int
pass_walloca::execute(function*)’:
../../gcc/gimple-ssa-warn-alloca.c:200:32: note: ‘ret’ declared here
  200 |   struct alloca_type_and_limit ret = alloca_type_and_limit (ALLOCA_OK);
      |                                ^~~
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:1142: gimple-ssa-warn-alloca.o] Error 1


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639
[Bug 24639] [meta-bug] bug to track all Wuninitialized issues
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98265
[Bug 98265] [10/11 Regression] gcc-10 has significantly worse code generated
with -O2 compared to -O1 (or gcc-9 -O2) when using the Eigen C++ library

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

end of thread, other threads:[~2021-04-10 11:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 10:16 [Bug middle-end/99989] New: [11 regression] False maybe-uninitialized warning breaks bootstrap on riscv64 schwab@linux-m68k.org
2021-04-09 10:17 ` [Bug middle-end/99989] " schwab@linux-m68k.org
2021-04-09 10:36 ` jakub at gcc dot gnu.org
2021-04-09 10:40 ` rguenth at gcc dot gnu.org
2021-04-09 10:47 ` rsandifo at gcc dot gnu.org
2021-04-09 10:48 ` jakub at gcc dot gnu.org
2021-04-09 10:57 ` rguenth at gcc dot gnu.org
2021-04-09 15:57 ` msebor at gcc dot gnu.org
2021-04-09 17:50 ` [Bug middle-end/99989] [11 regression] -Wmaybe-uninitialized " msebor at gcc dot gnu.org
2021-04-10 10:48 ` cvs-commit at gcc dot gnu.org
2021-04-10 10:50 ` jakub at gcc dot gnu.org
2021-04-10 11:07 ` schwab@linux-m68k.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).