public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/109765] New: [14 regression] ICE in real_to_decimal_for_mode
@ 2023-05-07 22:25 sjames at gcc dot gnu.org
  2023-05-07 22:42 ` [Bug c/109765] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-05-07 22:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109765
           Summary: [14 regression] ICE in real_to_decimal_for_mode
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Happens for all sorts of input, noticed initially with Meson's test program:
```
compiler stderr:

Running command: aarch64-unknown-linux-gnu-gcc -E -dM -

../wayland-1.22.0/meson.build:1:0: ERROR: Unable to detect GNU compiler type:
Compiler stdout:

-----
Compiler stderr:
<built-in>: internal compiler error: in real_to_decimal_for_mode, at
real.cc:1899
0xe036af real_to_decimal_for_mode(char*, real_value const*, unsigned long,
unsigned long, int, machine_mode)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/real.cc:1899
0x80cdeb builtin_define_with_hex_fp_value
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/c-family/c-cppbuiltin.cc:1877
0x80e8bf builtin_define_float_constants
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/c-family/c-cppbuiltin.cc:277
0x810103 c_cpp_builtins(cpp_reader*)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/c-family/c-cppbuiltin.cc:1245
0x82f853 c_finish_options
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/c-family/c-opts.cc:1489
0x831fb3 c_common_init()
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/c-family/c-opts.cc:1226
0x708243 lang_dependent_init
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/toplev.cc:1820
0x708243 do_compile
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/toplev.cc:2115
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.

-----
```

```
# echo hi  | aarch64-unknown-linux-gnu-gcc -E -dM -
<built-in>: internal compiler error: in real_to_decimal_for_mode, at
real.cc:1899

0xe036af real_to_decimal_for_mode(char*, real_value const*, unsigned long,
unsigned long, int, machine_mode)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/real.cc:1899
0x80cdeb builtin_define_with_hex_fp_value
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/c-family/c-cppbuiltin.cc:1877
0x80e8bf builtin_define_float_constants
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/c-family/c-cppbuiltin.cc:277
0x810103 c_cpp_builtins(cpp_reader*)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/c-family/c-cppbuiltin.cc:1245
0x82f853 c_finish_options
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/c-family/c-opts.cc:1489
0x831fb3 c_common_init()
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/c-family/c-opts.cc:1226
0x708243 lang_dependent_init
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/toplev.cc:1820
0x708243 do_compile
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/toplev.cc:2115
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

```
gcc (Gentoo 14.0.0.9999 p, commit ab60d0a28615153ee13cbf1401bdcdf2382ae0c4)
14.0.0 20230507 (experimental) 681ba2f7681f295a102cd63ffd5ce2b86a5f706e
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```

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

* [Bug c/109765] [14 regression] ICE in real_to_decimal_for_mode
  2023-05-07 22:25 [Bug c/109765] New: [14 regression] ICE in real_to_decimal_for_mode sjames at gcc dot gnu.org
@ 2023-05-07 22:42 ` pinskia at gcc dot gnu.org
  2023-05-07 22:49 ` [Bug bootstrap/109765] " pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-07 22:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |aarch64-unknown-linux-gnu

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I just built for aarch64 last night and I can't reproduce this.
ubuntu@ubuntu:~/src/upstream-gcc-aarch64/gcc\# ~/upstream-gcc/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/home/ubuntu/upstream-gcc/bin/gcc
COLLECT_LTO_WRAPPER=/home/ubuntu/upstream-gcc/libexec/gcc/aarch64-unknown-linux-gnu/14.0.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: /home/ubuntu/src/upstream-gcc-aarch64/gcc/configure
--prefix=/home/ubuntu/upstream-gcc
--enable-languages=c,c++,fortran,lto,objc,go,rust
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 20230507 (experimental) [master f2c31b4c1e2] (GCC)

r14-553-g2c8fa77120b48b4682f423 plus the patch for r14-558-ga1a9ce2441df0675 .

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

* [Bug bootstrap/109765] [14 regression] ICE in real_to_decimal_for_mode
  2023-05-07 22:25 [Bug c/109765] New: [14 regression] ICE in real_to_decimal_for_mode sjames at gcc dot gnu.org
  2023-05-07 22:42 ` [Bug c/109765] " pinskia at gcc dot gnu.org
@ 2023-05-07 22:49 ` pinskia at gcc dot gnu.org
  2023-05-07 23:25 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-07 22:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |bootstrap
           Keywords|                            |build, ice-on-valid-code
   Target Milestone|---                         |14.0

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The crash is coming from this:
  sprintf (name, "__%s_MIN__", name_prefix);
  sprintf (buf, "0x1p%d", fmt->emin - 1);
  builtin_define_with_hex_fp_value (name, type, decimal_dig, buf, fp_suffix,
fp_cast);

The only patch which might have an effect on this is r14-554 I think.
Trying to do a bootstrap right now.

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

* [Bug bootstrap/109765] [14 regression] ICE in real_to_decimal_for_mode
  2023-05-07 22:25 [Bug c/109765] New: [14 regression] ICE in real_to_decimal_for_mode sjames at gcc dot gnu.org
  2023-05-07 22:42 ` [Bug c/109765] " pinskia at gcc dot gnu.org
  2023-05-07 22:49 ` [Bug bootstrap/109765] " pinskia at gcc dot gnu.org
@ 2023-05-07 23:25 ` pinskia at gcc dot gnu.org
  2023-05-08  5:15 ` sjames at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-07 23:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Ok, I heard from Sam, that GMP might be miscompiling so building after doing
./contrib/download_prerequisites now.

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

* [Bug bootstrap/109765] [14 regression] ICE in real_to_decimal_for_mode
  2023-05-07 22:25 [Bug c/109765] New: [14 regression] ICE in real_to_decimal_for_mode sjames at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-05-07 23:25 ` pinskia at gcc dot gnu.org
@ 2023-05-08  5:15 ` sjames at gcc dot gnu.org
  2023-05-08  5:23 ` pinskia at gcc dot gnu.org
  2023-05-09 23:08 ` sjames at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-05-08  5:15 UTC (permalink / raw)
  To: gcc-bugs

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

Sam James <sjames at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
           See Also|                            |https://bugs.gentoo.org/sho
                   |                            |w_bug.cgi?id=889948
         Resolution|---                         |MOVED

--- Comment #4 from Sam James <sjames at gcc dot gnu.org> ---
Thanks to pinskia for looking at this with me and quickly ruling things out.

I'm pretty sure at this point it's a GMP bug. I've reported it on gmp-bugs with
a full summary but it's not on the archive yet. I'll include a link here when
it appears.

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

* [Bug bootstrap/109765] [14 regression] ICE in real_to_decimal_for_mode
  2023-05-07 22:25 [Bug c/109765] New: [14 regression] ICE in real_to_decimal_for_mode sjames at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-05-08  5:15 ` sjames at gcc dot gnu.org
@ 2023-05-08  5:23 ` pinskia at gcc dot gnu.org
  2023-05-09 23:08 ` sjames at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-08  5:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
My build/test that included building GMP just finished with no difference from
my last build too.

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

* [Bug bootstrap/109765] [14 regression] ICE in real_to_decimal_for_mode
  2023-05-07 22:25 [Bug c/109765] New: [14 regression] ICE in real_to_decimal_for_mode sjames at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-05-08  5:23 ` pinskia at gcc dot gnu.org
@ 2023-05-09 23:08 ` sjames at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-05-09 23:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Sam James <sjames at gcc dot gnu.org> ---
Report is at https://marc.info/?l=gmp-bugs&m=168367093126416&w=2. I ended up
sending it a few times because I've had mail delivery problems before and I
didn't realise the list was moderated even for subscribers. Oops.

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

end of thread, other threads:[~2023-05-09 23:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-07 22:25 [Bug c/109765] New: [14 regression] ICE in real_to_decimal_for_mode sjames at gcc dot gnu.org
2023-05-07 22:42 ` [Bug c/109765] " pinskia at gcc dot gnu.org
2023-05-07 22:49 ` [Bug bootstrap/109765] " pinskia at gcc dot gnu.org
2023-05-07 23:25 ` pinskia at gcc dot gnu.org
2023-05-08  5:15 ` sjames at gcc dot gnu.org
2023-05-08  5:23 ` pinskia at gcc dot gnu.org
2023-05-09 23:08 ` sjames 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).