This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/78689] [7 Regression] ICE (segfault)


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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
From looking at inh-ctor23.C and what GCC and clang++ produce, there are
different cases:
_ZN1VCI21WEi emitted in _ZN1VCI51WEi comdat, with _ZN1VCI11WEi alias to it,
which has the extra argument, callers pass it to it and users use it.
_ZN1XCI21WEi emitted in _ZN1XCI21WEi comdat, without _ZN1XCI11WEi alias, which
has the argument only in GCC (bug?), e.g. as seen with -O0 saves 3 arguments to
stack instead of 2:
        movq    %rdi, -8(%rbp)
        movq    %rsi, -16(%rbp)
        movl    %edx, -20(%rbp)
but callers actually provide 2:
  X::X (_2, _3);
I bet we want that extra argument (those extra arguments) to be there for
mangling, but then we should likely remove them both from DECL_ARGUMENTS and
from TYPE_ARG_TYPES (in that case it means probably replace the whole
METHOD_TYPE).  Otherwise I think the middle-end must be confused (callers pass
fewer args than the method really has), and at -O0 it also has to save
arguments it doesn't have that contain garbage etc.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]