public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/99719] New: ICE during RTL pass: pro_and_epilogue on MinGW-w64
@ 2021-03-23  0:48 unlvsur at live dot com
  2021-03-23  0:49 ` [Bug rtl-optimization/99719] " unlvsur at live dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: unlvsur at live dot com @ 2021-03-23  0:48 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99719
           Summary: ICE during RTL pass: pro_and_epilogue on MinGW-w64
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

D:\hg\fast_io\.tmp\c_file_test>g++ -o hello hello.cc -Ofast -std=c++20 -s
during RTL pass: pro_and_epilogue
hello.cc: In function 'int main()':
hello.cc:65:1: internal compiler error: in choose_baseaddr, at
config/i386/i386.c:6875
   65 | }
      | ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc-mcf.lhmouse.com/> for instructions.

D:\hg\fast_io\.tmp\c_file_test>g++ -o hello hello.cc -Ofast -std=c++20 -s
-march=native -flto

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

* [Bug rtl-optimization/99719] ICE during RTL pass: pro_and_epilogue on MinGW-w64
  2021-03-23  0:48 [Bug target/99719] New: ICE during RTL pass: pro_and_epilogue on MinGW-w64 unlvsur at live dot com
@ 2021-03-23  0:49 ` unlvsur at live dot com
  2021-03-23  7:28 ` [Bug target/99719] " rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: unlvsur at live dot com @ 2021-03-23  0:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from cqwrteur <unlvsur at live dot com> ---
Created attachment 50453
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50453&action=edit
Preprocessed file

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

* [Bug target/99719] ICE during RTL pass: pro_and_epilogue on MinGW-w64
  2021-03-23  0:48 [Bug target/99719] New: ICE during RTL pass: pro_and_epilogue on MinGW-w64 unlvsur at live dot com
  2021-03-23  0:49 ` [Bug rtl-optimization/99719] " unlvsur at live dot com
@ 2021-03-23  7:28 ` rguenth at gcc dot gnu.org
  2021-03-23  9:28 ` unlvsur at live dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-23  7:28 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-msys2-mingw-w64,     |x86_64-msys2-mingw-w64
                   |windows 10                  |
          Component|rtl-optimization            |target

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Do you have a working GCC version as well?

Please specify how you configured.

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

* [Bug target/99719] ICE during RTL pass: pro_and_epilogue on MinGW-w64
  2021-03-23  0:48 [Bug target/99719] New: ICE during RTL pass: pro_and_epilogue on MinGW-w64 unlvsur at live dot com
  2021-03-23  0:49 ` [Bug rtl-optimization/99719] " unlvsur at live dot com
  2021-03-23  7:28 ` [Bug target/99719] " rguenth at gcc dot gnu.org
@ 2021-03-23  9:28 ` unlvsur at live dot com
  2021-03-23 11:51 ` unlvsur at live dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: unlvsur at live dot com @ 2021-03-23  9:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from cqwrteur <unlvsur at live dot com> ---
yes it is a working gcc. it just fails in this specific case since today which
i fixes my library.

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: rguenth at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org>
Sent: Tuesday, March 23, 2021 3:28:36 AM
To: unlvsur@live.com <unlvsur@live.com>
Subject: [Bug target/99719] ICE during RTL pass: pro_and_epilogue on MinGW-w64

https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgcc.gnu.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D99719&amp;data=04%7C01%7C%7C82b9db0bbe2040e6a94708d8edcd4694%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637520813196747451%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=9K8fVx9KEMxEiJnyqSg2U85HCyAJA5tX3IgQSkPz6vo%3D&amp;reserved=0

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-msys2-mingw-w64,     |x86_64-msys2-mingw-w64
                   |windows 10                  |
          Component|rtl-optimization            |target

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Do you have a working GCC version as well?

Please specify how you configured.

--
You are receiving this mail because:
You reported the bug.

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

* [Bug target/99719] ICE during RTL pass: pro_and_epilogue on MinGW-w64
  2021-03-23  0:48 [Bug target/99719] New: ICE during RTL pass: pro_and_epilogue on MinGW-w64 unlvsur at live dot com
                   ` (2 preceding siblings ...)
  2021-03-23  9:28 ` unlvsur at live dot com
@ 2021-03-23 11:51 ` unlvsur at live dot com
  2021-03-24  8:37 ` unlvsur at live dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: unlvsur at live dot com @ 2021-03-23 11:51 UTC (permalink / raw)
  To: gcc-bugs

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

cqwrteur <unlvsur at live dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |unlvsur at live dot com

--- Comment #4 from cqwrteur <unlvsur at live dot com> ---
Created attachment 50455
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50455&action=edit
my settings

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

* [Bug target/99719] ICE during RTL pass: pro_and_epilogue on MinGW-w64
  2021-03-23  0:48 [Bug target/99719] New: ICE during RTL pass: pro_and_epilogue on MinGW-w64 unlvsur at live dot com
                   ` (3 preceding siblings ...)
  2021-03-23 11:51 ` unlvsur at live dot com
@ 2021-03-24  8:37 ` unlvsur at live dot com
  2021-03-26  9:19 ` ebotcazou at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: unlvsur at live dot com @ 2021-03-24  8:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from cqwrteur <unlvsur at live dot com> ---
(In reply to Richard Biener from comment #2)
> Do you have a working GCC version as well?
> 
> Please specify how you configured.

Hello. I know why the bug happens.

It looks like it is a bug when I use the attribute [[gnu::sysv_abi]] since I
want my parameters to be passed by value.

It has to be a bug related between the swap of [[gnu::ms_abi]] and
[[gnu::sysv_abi]].

However, it looks like swapping to ms_abi from sysv_abi will cleanup SIMD
registers. Is that correct?

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

* [Bug target/99719] ICE during RTL pass: pro_and_epilogue on MinGW-w64
  2021-03-23  0:48 [Bug target/99719] New: ICE during RTL pass: pro_and_epilogue on MinGW-w64 unlvsur at live dot com
                   ` (4 preceding siblings ...)
  2021-03-24  8:37 ` unlvsur at live dot com
@ 2021-03-26  9:19 ` ebotcazou at gcc dot gnu.org
  2021-03-26 11:07 ` unlvsur at live dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2021-03-26  9:19 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |SUSPENDED
   Last reconfirmed|                            |2021-03-26
                 CC|                            |ebotcazou at gcc dot gnu.org

--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> However, it looks like swapping to ms_abi from sysv_abi will cleanup SIMD
> registers. Is that correct?

Fiddling with the ABI is highly discouraged in anything else than very
low-level code, so templatized C++ very likely does not qualify.

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

* [Bug target/99719] ICE during RTL pass: pro_and_epilogue on MinGW-w64
  2021-03-23  0:48 [Bug target/99719] New: ICE during RTL pass: pro_and_epilogue on MinGW-w64 unlvsur at live dot com
                   ` (5 preceding siblings ...)
  2021-03-26  9:19 ` ebotcazou at gcc dot gnu.org
@ 2021-03-26 11:07 ` unlvsur at live dot com
  2021-03-26 11:07 ` unlvsur at live dot com
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: unlvsur at live dot com @ 2021-03-26 11:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from cqwrteur <unlvsur at live dot com> ---
(In reply to Eric Botcazou from comment #6)
> > However, it looks like swapping to ms_abi from sysv_abi will cleanup SIMD
> > registers. Is that correct?
> 
> Fiddling with the ABI is highly discouraged in anything else than very
> low-level code, so templatized C++ very likely does not qualify.

the issue is that on MSVC abi, types like std::string_view, std::span are
passed by reference instead of passing them in the registers. (since they are
16 bytes).

I do not know whether we have a solution to pass them in registers temporarily
for some functions.

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

* [Bug target/99719] ICE during RTL pass: pro_and_epilogue on MinGW-w64
  2021-03-23  0:48 [Bug target/99719] New: ICE during RTL pass: pro_and_epilogue on MinGW-w64 unlvsur at live dot com
                   ` (6 preceding siblings ...)
  2021-03-26 11:07 ` unlvsur at live dot com
@ 2021-03-26 11:07 ` unlvsur at live dot com
  2022-06-21  2:19 ` pinskia at gcc dot gnu.org
  2022-06-21  2:20 ` pinskia at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: unlvsur at live dot com @ 2021-03-26 11:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from cqwrteur <unlvsur at live dot com> ---
(In reply to cqwrteur from comment #7)
> (In reply to Eric Botcazou from comment #6)
> > > However, it looks like swapping to ms_abi from sysv_abi will cleanup SIMD
> > > registers. Is that correct?
> > 
> > Fiddling with the ABI is highly discouraged in anything else than very
> > low-level code, so templatized C++ very likely does not qualify.
> 
> the issue is that on MSVC abi, types like std::string_view, std::span are
> passed by reference instead of passing them in the registers. (since they
> are 16 bytes).
> 
> I do not know whether we have a solution to pass them in registers
> temporarily for some functions.

That means std::string_view/std::span is not zero-overhead. They are extremely
slow.

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

* [Bug target/99719] ICE during RTL pass: pro_and_epilogue on MinGW-w64
  2021-03-23  0:48 [Bug target/99719] New: ICE during RTL pass: pro_and_epilogue on MinGW-w64 unlvsur at live dot com
                   ` (7 preceding siblings ...)
  2021-03-26 11:07 ` unlvsur at live dot com
@ 2022-06-21  2:19 ` pinskia at gcc dot gnu.org
  2022-06-21  2:20 ` pinskia at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-06-21  2:19 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|SUSPENDED                   |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 97822.

*** This bug has been marked as a duplicate of bug 97822 ***

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

* [Bug target/99719] ICE during RTL pass: pro_and_epilogue on MinGW-w64
  2021-03-23  0:48 [Bug target/99719] New: ICE during RTL pass: pro_and_epilogue on MinGW-w64 unlvsur at live dot com
                   ` (8 preceding siblings ...)
  2022-06-21  2:19 ` pinskia at gcc dot gnu.org
@ 2022-06-21  2:20 ` pinskia at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-06-21  2:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note the issue is [[gnu::sysv_abi]] really. It is a known issue with
x86_64-mingw and cygwin64.

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

end of thread, other threads:[~2022-06-21  2:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23  0:48 [Bug target/99719] New: ICE during RTL pass: pro_and_epilogue on MinGW-w64 unlvsur at live dot com
2021-03-23  0:49 ` [Bug rtl-optimization/99719] " unlvsur at live dot com
2021-03-23  7:28 ` [Bug target/99719] " rguenth at gcc dot gnu.org
2021-03-23  9:28 ` unlvsur at live dot com
2021-03-23 11:51 ` unlvsur at live dot com
2021-03-24  8:37 ` unlvsur at live dot com
2021-03-26  9:19 ` ebotcazou at gcc dot gnu.org
2021-03-26 11:07 ` unlvsur at live dot com
2021-03-26 11:07 ` unlvsur at live dot com
2022-06-21  2:19 ` pinskia at gcc dot gnu.org
2022-06-21  2:20 ` 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).