[Bug libstdc++/100361] gcc-11 for msp430-elf fails to build: src/c++17/floating_to_chars.cc:107: d2fixed_full_table.h:1283:23: error: size of array ‘POW10_SPLIT_2’ exceeds maximum object size ‘32767’

2023-06-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100361

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|--- |11.2
 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #13 from Jonathan Wakely  ---
The relevant files don't exist on the gcc-10 branch, so this is fixed in 11.2,
right?

Please reopen if not.

[Bug libstdc++/100361] gcc-11 for msp430-elf fails to build: src/c++17/floating_to_chars.cc:107: d2fixed_full_table.h:1283:23: error: size of array ‘POW10_SPLIT_2’ exceeds maximum object size ‘32767’

2021-05-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100361

--- Comment #12 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Joern Rennecke
:

https://gcc.gnu.org/g:5f772bd9847cdbf6a7a6d856de87cb65472d56f4

commit r11-8446-g5f772bd9847cdbf6a7a6d856de87cb65472d56f4
Author: Joern Rennecke 
Date:   Thu May 20 13:21:41 2021 +0100

libstdc++: Disable floating_to_chars.cc on 16 bit targets

This patch conditionally disables the compilation of floating_to_chars.cc
on 16 bit targets, thus fixing a build failure for these targets as
the POW10_SPLIT_2 array exceeds the maximum object size.

libstdc++-v3/
PR libstdc++/100361
* include/std/charconv (to_chars): Hide the overloads for
floating-point types for 16 bit targets.
* src/c++17/floating_to_chars.cc: Don't compile for 16 bit targets.
* testsuite/20_util/to_chars/double.cc: Run this test only on
size32plus targets.
* testsuite/20_util/to_chars/float.cc: Likewise.
* testsuite/20_util/to_chars/long_double.cc: Likewise.

[Bug libstdc++/100361] gcc-11 for msp430-elf fails to build: src/c++17/floating_to_chars.cc:107: d2fixed_full_table.h:1283:23: error: size of array ‘POW10_SPLIT_2’ exceeds maximum object size ‘32767’

2021-05-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100361

--- Comment #11 from CVS Commits  ---
The master branch has been updated by Joern Rennecke :

https://gcc.gnu.org/g:66c5f24788652a49b528f14e23e8121ad0935ace

commit r12-942-g66c5f24788652a49b528f14e23e8121ad0935ace
Author: Joern Rennecke 
Date:   Thu May 20 13:21:41 2021 +0100

libstdc++: Disable floating_to_chars.cc on 16 bit targets

This patch conditionally disables the compilation of floating_to_chars.cc
on 16 bit targets, thus fixing a build failure for these targets as
the POW10_SPLIT_2 array exceeds the maximum object size.

libstdc++-v3/
PR libstdc++/100361
* include/std/charconv (to_chars): Hide the overloads for
floating-point types for 16 bit targets.
* src/c++17/floating_to_chars.cc: Don't compile for 16 bit targets.
* testsuite/20_util/to_chars/double.cc: Run this test only on
size32plus targets.
* testsuite/20_util/to_chars/float.cc: Likewise.
* testsuite/20_util/to_chars/long_double.cc: Likewise.

[Bug libstdc++/100361] gcc-11 for msp430-elf fails to build: src/c++17/floating_to_chars.cc:107: d2fixed_full_table.h:1283:23: error: size of array ‘POW10_SPLIT_2’ exceeds maximum object size ‘32767’

2021-05-19 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100361

--- Comment #10 from Sergei Trofimovich  ---
Amended patch fixes msp430-elf build as well. Thank you!

[Bug libstdc++/100361] gcc-11 for msp430-elf fails to build: src/c++17/floating_to_chars.cc:107: d2fixed_full_table.h:1283:23: error: size of array ‘POW10_SPLIT_2’ exceeds maximum object size ‘32767’

2021-05-19 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100361

--- Comment #9 from Jonathan Wakely  ---
Nice, thanks, Joern. That patch is OK for trunk and gcc-11 (please remember to
CC the libstdc++ list when you post it to gcc-patches).

[Bug libstdc++/100361] gcc-11 for msp430-elf fails to build: src/c++17/floating_to_chars.cc:107: d2fixed_full_table.h:1283:23: error: size of array ‘POW10_SPLIT_2’ exceeds maximum object size ‘32767’

2021-05-19 Thread amylaar at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100361

--- Comment #8 from Jorn Wolfgang Rennecke  ---
Bootstrapped and regression tested on x86_64-pc-linux-gnu.

[Bug libstdc++/100361] gcc-11 for msp430-elf fails to build: src/c++17/floating_to_chars.cc:107: d2fixed_full_table.h:1283:23: error: size of array ‘POW10_SPLIT_2’ exceeds maximum object size ‘32767’

2021-05-18 Thread amylaar at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100361

Jorn Wolfgang Rennecke  changed:

   What|Removed |Added

  Attachment #50837|0   |1
is obsolete||

--- Comment #7 from Jorn Wolfgang Rennecke  ---
Created attachment 50839
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50839&action=edit
Amended patch

This patch also disables the affected tests.

[Bug libstdc++/100361] gcc-11 for msp430-elf fails to build: src/c++17/floating_to_chars.cc:107: d2fixed_full_table.h:1283:23: error: size of array ‘POW10_SPLIT_2’ exceeds maximum object size ‘32767’

2021-05-18 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100361

--- Comment #6 from Jonathan Wakely  ---
That patch isn't OK, because the declarations in  would still be
present, but using them would give linker errors.

I think we should just check __SIZE_WIDTH__ < 32 (in that .cc file and in the
header).

If somebody wants to contribute an implementation that doesn't use the tables
and trades off time for space then we can support them, but I don't think
that's a good use of Patrick's time.

[Bug libstdc++/100361] gcc-11 for msp430-elf fails to build: src/c++17/floating_to_chars.cc:107: d2fixed_full_table.h:1283:23: error: size of array ‘POW10_SPLIT_2’ exceeds maximum object size ‘32767’

2021-05-18 Thread amylaar at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100361

--- Comment #5 from Jorn Wolfgang Rennecke  ---
(In reply to Patrick Palka from comment #3)

> Btw, we already disable the floating-point to_chars on targets without a
> binary64 double.  So is our test for detecting binary64 not accurate enough,
> or are these 16-bit targets whose double type really is binary64?

At least in the case of eSi-RISC, it is the latter.

[Bug libstdc++/100361] gcc-11 for msp430-elf fails to build: src/c++17/floating_to_chars.cc:107: d2fixed_full_table.h:1283:23: error: size of array ‘POW10_SPLIT_2’ exceeds maximum object size ‘32767’

2021-05-18 Thread amylaar at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100361

--- Comment #4 from Jorn Wolfgang Rennecke  ---
Created attachment 50837
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50837&action=edit
Proposed patch

This patch fixes the problem for eSi-RISC and bootstraps on x86_64-pc-linux-gnu
, with floating_to_chars.o properly built in each stage.

Could you check that this also works for msp430?

[Bug libstdc++/100361] gcc-11 for msp430-elf fails to build: src/c++17/floating_to_chars.cc:107: d2fixed_full_table.h:1283:23: error: size of array ‘POW10_SPLIT_2’ exceeds maximum object size ‘32767’

2021-05-18 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100361

--- Comment #3 from Patrick Palka  ---
(In reply to Jonathan Wakely from comment #2)
> Patrick, is the table an optimization, or essential? We might be able to
> avoid it, but he functions would be much slower.

The tables are essential for Ryu's d2exp_buffered_n and d2fixed_buffered_n
routines, which we use for fast explicit-precision formatting of float/double.

> 
> Maybe we should just disable the floating-point to_chars for 16-bit targets.

Agreed.. though in theory we could just go through printf as a fallback for
d2exp_buffered_n and d2fixed_buffered_n on these targets.

Btw, we already disable the floating-point to_chars on targets without a
binary64 double.  So is our test for detecting binary64 not accurate enough, or
are these 16-bit targets whose double type really is binary64?

[Bug libstdc++/100361] gcc-11 for msp430-elf fails to build: src/c++17/floating_to_chars.cc:107: d2fixed_full_table.h:1283:23: error: size of array ‘POW10_SPLIT_2’ exceeds maximum object size ‘32767’

2021-05-18 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100361

Jonathan Wakely  changed:

   What|Removed |Added

 CC||ppalka at gcc dot gnu.org

--- Comment #2 from Jonathan Wakely  ---
Patrick, is the table an optimization, or essential? We might be able to avoid
it, but he functions would be much slower.

Maybe we should just disable the floating-point to_chars for 16-bit targets.

[Bug libstdc++/100361] gcc-11 for msp430-elf fails to build: src/c++17/floating_to_chars.cc:107: d2fixed_full_table.h:1283:23: error: size of array ‘POW10_SPLIT_2’ exceeds maximum object size ‘32767’

2021-05-18 Thread amylaar at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100361

Jorn Wolfgang Rennecke  changed:

   What|Removed |Added

 CC||amylaar at gcc dot gnu.org
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Last reconfirmed||2021-05-18

--- Comment #1 from Jorn Wolfgang Rennecke  ---
I also see this for 16 bit eSi-RISC targets.  This array can't fit into a 16
bit address space that addresses 8 bit units.