public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110283] New: Bogus Warray-bounds
@ 2023-06-16 12:18 pilarlatiesa at gmail dot com
  2023-06-16 12:19 ` [Bug c++/110283] " pilarlatiesa at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pilarlatiesa at gmail dot com @ 2023-06-16 12:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110283
           Summary: Bogus Warray-bounds
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pilarlatiesa at gmail dot com
  Target Milestone: ---

$ ~/gcc-13/bin/g++ -v
Usando especificaciones internas.
COLLECT_GCC=~/gcc-13/bin/g++
COLLECT_LTO_WRAPPER=/home/pililatiesa/gcc-13/libexec/gcc/x86_64-pc-linux-gnu/13.1.0/lto-wrapper
Objetivo: x86_64-pc-linux-gnu
Configurado con: ../gcc-13.1.0/configure --enable-languages=c,c++
--disable-multilib --prefix=/home/pililatiesa/gcc-13/
Modelo de hilos: posix
Algoritmos de compresión LTO admitidos: zlib
gcc versión 13.1.0 (GCC)


$ ~/gcc-13/bin/g++ -std=c++23 -Wall -O3 -c ElemBase.ii 
En el fichero incluido desde ../../MEF/ElemBase.h:11,
                 desde ../ElemBase.cpp:2:
In member function ‘constexpr const std::array<_Tp, _Nm>::value_type&
std::array<_Tp, _Nm>::operator[](size_type) const [with _Tp = const TNodo<3>*;
long unsigned int _Nm = 2]’,
    inlined from ‘const TNodo<TElemTraits<TElem>::Ngdl>&
TElemBase<TElem>::Nodo(int) const [with TElem = TElemViga]’ at
../../MEF/ElemBase.h:64:25,
    inlined from ‘void TElemBase<TElem>::CalcCCTerm(TTripletVec&) const [with
TElem = TElemViga]’ at ../ElemBase.cpp:10:21:
/home/pililatiesa/gcc-13/include/c++/13.1.0/array:213:17: aviso: el subíndice 2
de la matriz está por encima de los límites de matriz de
‘std::__array_traits<const TNodo<3>*, 2>::_Type’ {aka ‘const TNodo<3>* const
[2]’} [-Warray-bounds=]
/home/pililatiesa/gcc-13/include/c++/13.1.0/array: In member function ‘void
TElemBase<TElem>::CalcCCTerm(TTripletVec&) const [with TElem = TElemViga]’:
/home/pililatiesa/gcc-13/include/c++/13.1.0/array:109:48: nota: while
referencing ‘std::array<const TNodo<3>*, 2>::_M_elems’

I couldn't get rid of the eigen dependency, sorry.

It only happens with O3.

It appears that it is only a bogus warning, but I don't know if wrong code is
actually generated.

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

end of thread, other threads:[~2023-06-22 22:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-16 12:18 [Bug c++/110283] New: Bogus Warray-bounds pilarlatiesa at gmail dot com
2023-06-16 12:19 ` [Bug c++/110283] " pilarlatiesa at gmail dot com
2023-06-16 21:06 ` [Bug tree-optimization/110283] " pinskia at gcc dot gnu.org
2023-06-22 22:46 ` c_antonio_sanchez at msn dot com
2023-06-22 22:52 ` pinskia 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).