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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to cuilili from comment #1)
> Created attachment 61678 [details]
> Fix-shrink-wrap-separate-ICE-for-mingw
> 
> Hi Sergei,
> 
> Thanks for reporting this issue and providing a small testcase. I reproduced
> this issue locally and fixed it. Could you help verify it in your
> environment? Thank you!

Hi Lili,

This testcase also failed on Linux/x86-64.  Please use it in your patch:

[hjl@gnu-tgl-3 gcc]$ cat /tmp/x.c
short __mingw_swformat_format;
__builtin_va_list __mingw_swformat_arg;
int __mingw_swformat_fc;
typedef struct {
  void *fp;
  int bch[1024];
} _IFP;
void __mingw_swformat(_IFP *s) {
  if (s->fp)
    while (__mingw_swformat_format)
      if (__mingw_swformat_fc == 'A')
        *__builtin_va_arg(__mingw_swformat_arg, double *) = 0;
}
void
__mingw_vswscanf (void)
{
  _IFP ifp;
  __mingw_swformat(&ifp);
}
[hjl@gnu-tgl-3 gcc]$ ./xgcc -B./ -S -m32 -march=i686 -O2 /tmp/x.c
-mstack-arg-probe  
during RTL pass: pro_and_epilogue
/tmp/x.c: In function ‘__mingw_vswscanf’:
/tmp/x.c:19:1: internal compiler error: in ix86_expand_prologue, at
config/i386/i386.cc:9446
   19 | }
      | ^
0x2cc130d internal_error(char const*, ...)
       
/export/gnu/import/git/gitlab/x86-gcc/gcc/diagnostic-global-context.cc:517
0x2c812cd fancy_abort(char const*, int, char const*)
        /export/gnu/import/git/gitlab/x86-gcc/gcc/diagnostic.cc:1803
0x13c9925 ix86_expand_prologue()
        /export/gnu/import/git/gitlab/x86-gcc/gcc/config/i386/i386.cc:9446
0x20c22e9 gen_prologue()
        /export/gnu/import/git/gitlab/x86-gcc/gcc/config/i386/i386.md:20964
0x13affba target_gen_prologue
        /export/gnu/import/git/gitlab/x86-gcc/gcc/config/i386/i386.md:29396
0x9137be make_prologue_seq
        /export/gnu/import/git/gitlab/x86-gcc/gcc/function.cc:5862
0x913dbc thread_prologue_and_epilogue_insns()
        /export/gnu/import/git/gitlab/x86-gcc/gcc/function.cc:6115
0x914dab rest_of_handle_thread_prologue_and_epilogue
        /export/gnu/import/git/gitlab/x86-gcc/gcc/function.cc:6609
0x914fcd execute
        /export/gnu/import/git/gitlab/x86-gcc/gcc/function.cc:6695
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
[hjl@gnu-tgl-3 gcc]$

Reply via email to