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

--- Comment #5 from Segher Boessenkool <segher at gcc dot gnu.org> ---
On powerpc64-linux the failure is

In file included from /home/segher/src/gcc/gcc/c-family/c-common.h:26,
                 from /home/segher/src/gcc/gcc/cp/cp-tree.h:40,
                 from /home/segher/src/gcc/gcc/cp/module.cc:209:
In function 'tree_node* identifier(const cpp_hashnode*)',
    inlined from 'bool module_state::read_macro_maps()' at
/home/segher/src/gcc/gcc/cp/module.cc:16305:10:
/home/segher/src/gcc/gcc/tree.h:1089:58: error: array subscript -1 is outside
array bounds of 'cpp_hashnode [288230376151711743]' [-Werror=array-bounds]
 1089 |   ((tree) ((char *) (NODE) - sizeof (struct tree_common)))
      |                                                          ^
/home/segher/src/gcc/gcc/cp/module.cc:277:10: note: in expansion of macro
'HT_IDENT_TO_GCC_IDENT'
  277 |   return HT_IDENT_TO_GCC_IDENT (HT_NODE (const_cast<cpp_hashnode *>
(node)));
      |          ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/segher/src/gcc/gcc/tree.h:23,
                 from /home/segher/src/gcc/gcc/c-family/c-common.h:26,
                 from /home/segher/src/gcc/gcc/cp/cp-tree.h:40,
                 from /home/segher/src/gcc/gcc/cp/module.cc:209:
/home/segher/src/gcc/gcc/tree-core.h: In member function 'bool
module_state::read_macro_maps()':
/home/segher/src/gcc/gcc/tree-core.h:1445:24: note: at offset -24 into object
'tree_identifier::id' of size 16
 1445 |   struct ht_identifier id;
      |                        ^~
In file included from /home/segher/src/gcc/gcc/c-family/c-common.h:26,
                 from /home/segher/src/gcc/gcc/cp/cp-tree.h:40,
                 from /home/segher/src/gcc/gcc/cp/module.cc:209:
In function 'tree_node* identifier(const cpp_hashnode*)',
    inlined from 'void module_state::install_macros()' at
/home/segher/src/gcc/gcc/cp/module.cc:16915:10:
/home/segher/src/gcc/gcc/tree.h:1089:58: error: array subscript -1 is outside
array bounds of 'cpp_hashnode [288230376151711743]' [-Werror=array-bounds]
 1089 |   ((tree) ((char *) (NODE) - sizeof (struct tree_common)))
      |                                                          ^
/home/segher/src/gcc/gcc/cp/module.cc:277:10: note: in expansion of macro
'HT_IDENT_TO_GCC_IDENT'
  277 |   return HT_IDENT_TO_GCC_IDENT (HT_NODE (const_cast<cpp_hashnode *>
(node)));
      |          ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/segher/src/gcc/gcc/tree.h:23,
                 from /home/segher/src/gcc/gcc/c-family/c-common.h:26,
                 from /home/segher/src/gcc/gcc/cp/cp-tree.h:40,
                 from /home/segher/src/gcc/gcc/cp/module.cc:209:
/home/segher/src/gcc/gcc/tree-core.h: In member function 'void
module_state::install_macros()':
/home/segher/src/gcc/gcc/tree-core.h:1445:24: note: at offset -24 into object
'tree_identifier::id' of size 16
 1445 |   struct ht_identifier id;
      |                        ^~
In file included from /home/segher/src/gcc/gcc/c-family/c-common.h:26,
                 from /home/segher/src/gcc/gcc/cp/cp-tree.h:40,
                 from /home/segher/src/gcc/gcc/cp/module.cc:209:
In function 'tree_node* identifier(const cpp_hashnode*)',
    inlined from 'void module_state::install_macros()' at
/home/segher/src/gcc/gcc/cp/module.cc:16933:16:
/home/segher/src/gcc/gcc/tree.h:1089:58: error: array subscript -1 is outside
array bounds of 'cpp_hashnode [288230376151711743]' [-Werror=array-bounds]
 1089 |   ((tree) ((char *) (NODE) - sizeof (struct tree_common)))
      |                                                          ^
/home/segher/src/gcc/gcc/cp/module.cc:277:10: note: in expansion of macro
'HT_IDENT_TO_GCC_IDENT'
  277 |   return HT_IDENT_TO_GCC_IDENT (HT_NODE (const_cast<cpp_hashnode *>
(node)));
      |          ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/segher/src/gcc/gcc/tree.h:23,
                 from /home/segher/src/gcc/gcc/c-family/c-common.h:26,
                 from /home/segher/src/gcc/gcc/cp/cp-tree.h:40,
                 from /home/segher/src/gcc/gcc/cp/module.cc:209:
/home/segher/src/gcc/gcc/tree-core.h: In member function 'void
module_state::install_macros()':
/home/segher/src/gcc/gcc/tree-core.h:1445:24: note: at offset -24 into object
'tree_identifier::id' of size 16
 1445 |   struct ht_identifier id;
      |                        ^~
cc1plus: all warnings being treated as errors

Reply via email to