public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "iamanonymous.cs at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/115426] New: ICE in execute_todo, at passes.cc:2138
Date: Tue, 11 Jun 2024 03:40:19 +0000	[thread overview]
Message-ID: <bug-115426-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 115426
           Summary: ICE in execute_todo, at passes.cc:2138
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iamanonymous.cs at gmail dot com
  Target Milestone: ---
            Target: x86_64

*******************************************************************************
The compiler produces an internal error when compiling the provided code with
the specified options. 
The issue occurs during the GIMPLE pass (walloca), causing an internal compiler
error in the execute_todo function at passes.cc:2138.
*******************************************************************************
OS and Platform:
# uname -a
Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023
x86_64 x86_64 x86_64 GNU/Linux
*******************************************************************************
# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/root/gdbtest/gcc/gcc-15/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /root/gdbtest/gcc/obj/../gcc/configure
--prefix=/root/gdbtest/gcc/gcc-15 --enable-languages=c,c++,fortran,go
--disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240509 (experimental) (GCC) 
*******************************************************************************
Program:
# cat fam-asm.c

 #include <stdio.h>
 #include <complex.h> 

 _Complex float fcs(_Complex float x) {
  float ixy;
  float diff, sum;
  _Complex float r;
  __asm__("fmul %s[ixy], %s[xr], %s[yr]\n"
          "\tfsub %s[diff], %s[xr], %s[yr]\n"
          "\tfadd %s[sum],  %s[xr], %s[yr]\n"
          "\tfmul %s[rr],  %s[diff], %s[sum]\n"
          "\tfadd %s[ri],  %s[ixy], %s[ixy]\n"
          : [ixy] "=&w" (ixy), [diff] "=&w" (diff), [sum] "=w" (sum), [rr] "=w"
(__real__ r), [ri] "=w" (__imag__ r)
          : [xr] "w" (__real__ x), [yr] "w"( __imag__ x)
          : );
  return r;
 }

 int main(int argc, char *argv[])
 {
  _Complex float i = 0.0f + I * 1.0f;
  _Complex float i2 = fcs(i);
  printf("%f+i%f\n", __real__ i2, __imag__ i2);
 }


*******************************************************************************
Command Lines:
# gcc fam-asm.c -Wall -Wextra  -o fam-asm.out
fam-asm.c: In function ‘main’:
fam-asm.c:19:15: warning: unused parameter ‘argc’ [-Wunused-parameter]
   19 |  int main(int argc, char *argv[])
      |           ~~~~^~~~
fam-asm.c:19:27: warning: unused parameter ‘argv’ [-Wunused-parameter]
   19 |  int main(int argc, char *argv[])
      |                     ~~~~~~^~~~~~
during GIMPLE pass: walloca
fam-asm.c: In function ‘fcs’:
fam-asm.c:24:2: internal compiler error: in execute_todo, at passes.cc:2138
   24 |  }
      |  ^
0x839f1b execute_todo
        /root/gdbtest/gcc/obj/../gcc/gcc/passes.cc:2138
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.

*******************************************************************************

Also ICE on trunk, compiler explorer:https://godbolt.org/z/soaoeW5z7

*******************************************************************************

             reply	other threads:[~2024-06-11  3:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-11  3:40 iamanonymous.cs at gmail dot com [this message]
2024-06-11  4:05 ` [Bug tree-optimization/115426] ICE: " pinskia at gcc dot gnu.org
2024-06-11  9:51 ` rguenth at gcc dot gnu.org
2024-06-11 11:07 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-115426-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).