public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
@ 2024-06-14  5:40 gang.peng at aclsemi dot com
  2024-06-14  5:51 ` [Bug c++/115485] " gang.peng at aclsemi dot com
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: gang.peng at aclsemi dot com @ 2024-06-14  5:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115485
           Summary: CASEServer.cpp:203:1: internal compiler error: in
                    require_pic_register, at config/arm/arm.c:7855
           Product: gcc
           Version: 10.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gang.peng at aclsemi dot com
  Target Milestone: ---

Dear Sir,

1. Compiler version (e.g., output of g++ --version)
ubuntu240:~/build_code$
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-g++ --version
arm-none-eabi-g++ (GNU Arm Embedded Toolchain 10.3-2021.10) 10.3.1 20210824
(release)
Copyright (C) 2020 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.

2. Command line used for compilation
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-g++ -MMD -MF
libSecureChannel.CASEServer.cpp.o.d -Wconversion -Os -g -fno-common
-ffunction-sections -fdata-sections -fno-exceptions -fno-unwind-tables
-fno-asynchronous-unwind-tables -Wall -Werror -Wstack-usage=8192 -Wextra
-Wshadow -Wunreachable-code -Wvla -Wformat -Wformat-nonliteral
-Wformat-security -Wno-deprecated-declarations -Wno-missing-field-initializers
-Wno-unknown-warning-option -Wno-unused-parameter -Wno-cast-function-type
-Wno-psabi -Wno-maybe-uninitialized -fdiagnostics-color -fno-strict-aliasing
-fmacro-prefix-map=.= -std=gnu++17 -fno-rtti -Wnon-virtual-dtor
-DCHIP_PROJECT=1 -DCHIP_HAVE_CONFIG_H=1 -DCFG_MBEDTLS=0
-DCFG_MBEDTLS_ACCELERATOR=1
-DMBEDTLS_CONFIG_FILE=\"tfm_mbedcrypto_config_profile_medium.h\"
-DCRYPTO_HW_ACCELERATOR -DLWIP_IPV6=1 -DLWIP_IPV6_ND=1 -DLWIP_IPV6_SCOPES=1
-DLWIP_PBUF_FROM_CUSTOM_POOLS=0 -DLWIP_IPV6_ROUTE_TABLE_SUPPORT=1
-DCHIP_DEVICE_LAYER_NONE=0 -DCHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF=0
-DCHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS=0
-DCHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS=0
-DCHIP_SYSTEM_CONFIG_USE_LWIP=1 -DCHIP_SYSTEM_CONFIG_USE_SOCKETS=0
-DCHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK=0
-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=\ -fPIE -msingle-pic-base
-mpic-register=r9 -fomit-frame-pointer -mno-pic-data-is-text-relative -mthumb
-mlong-calls -mcpu=cortex-m33+nodsp -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mcmse
--specs=nosys.specs --specs=nano.specs -nostdlib -fno-use-cxa-atexit
-Wno-conversion -Wno-error -Wno-sign-compare -Wno-unused-function
-Wno-unused-but-set-variable -Wno-unused-variable -Wno-literal-suffix
-fno-builtin-printf -fno-builtin-sprintf -fno-builtin-snprintf
-DCHIP_HAVE_CONFIG_H=1 -DCHIP_MINMDNS_USE_EPHEMERAL_UNICAST_PORT=0
-DCHIP_MINMDNS_HIGH_VERBOSITY=0 -DCHIP_MINMDNS_DEFAULT_POLICY=1 -Iinclude
-Iinclude/include -Iinclude/port -Iinclude/lib -c CASEServer.cpp -o
libSecureChannel.CASEServer.cpp.o

3. Full error message and stack trace
CASEServer.cpp: In member function 'virtual CHIP_ERROR
chip::CASEServer::_ZThn4_N4chip10CASEServer28OnUnsolicitedMessageReceivedERKNS_13PayloadHeaderERPNS_9Messaging16ExchangeDelegateE(const
chip::PayloadHeader&, chip::Messaging::ExchangeDelegate*&)':
CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at
config/arm/arm.c:7855
203 | } // namespace chip
       | ^ 0x7f68ad3e5082
__libc_start_main ../csu/libc-start.c:308
Please submit a full bug report, with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See for instructions.

4. Attached is Minimal reproducible example of the code

Thank you very much!

BRs
Gang Peng

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

* [Bug c++/115485] CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
  2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
@ 2024-06-14  5:51 ` gang.peng at aclsemi dot com
  2024-06-14  5:52 ` gang.peng at aclsemi dot com
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: gang.peng at aclsemi dot com @ 2024-06-14  5:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Gang Peng <gang.peng at aclsemi dot com> ---
Created attachment 58422
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58422&action=edit
Minimal reproducible example of the code

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

* [Bug c++/115485] CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
  2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
  2024-06-14  5:51 ` [Bug c++/115485] " gang.peng at aclsemi dot com
@ 2024-06-14  5:52 ` gang.peng at aclsemi dot com
  2024-06-14  5:59 ` gang.peng at aclsemi dot com
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: gang.peng at aclsemi dot com @ 2024-06-14  5:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Gang Peng <gang.peng at aclsemi dot com> ---
Created attachment 58423
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58423&action=edit
build_code.tar.7z.002

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

* [Bug c++/115485] CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
  2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
  2024-06-14  5:51 ` [Bug c++/115485] " gang.peng at aclsemi dot com
  2024-06-14  5:52 ` gang.peng at aclsemi dot com
@ 2024-06-14  5:59 ` gang.peng at aclsemi dot com
  2024-06-14 23:30 ` [Bug target/115485] " pinskia at gcc dot gnu.org
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: gang.peng at aclsemi dot com @ 2024-06-14  5:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Gang Peng <gang.peng at aclsemi dot com> ---
Dear Sir,

When I build cpp with gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-g++
I meet this error, and the following compilation options are required:

CFLAGS += -fPIE
CFLAGS += -msingle-pic-base
CFLAGS += -mpic-register=r9
CFLAGS += -fomit-frame-pointer
CFLAGS += -mno-pic-data-is-text-relative
CFLAGS += -mthumb
CFLAGS += -mlong-calls 

Could you kindly help to have a look how I should solve this problem? thank you
very much!

BRs
Gang Peng

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

* [Bug target/115485] CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
  2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
                   ` (2 preceding siblings ...)
  2024-06-14  5:59 ` gang.peng at aclsemi dot com
@ 2024-06-14 23:30 ` pinskia at gcc dot gnu.org
  2024-06-15  2:00 ` gang.peng at aclsemi dot com
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-14 23:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>GNU Arm Embedded Toolchain 10.3-2021.10

I looked into the official releases of GCC 10.3.0 and arm.c:7855 does not
correspond to a place where an assert happens. You should file this bug with
the folks who recieved the binary release from since they have modified the
sources.

Also GCC 10.x is no longer supported so can you try a newer version of GCC?
Like GCC 14.1.0 or 13.3.0?

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

* [Bug target/115485] CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
  2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
                   ` (3 preceding siblings ...)
  2024-06-14 23:30 ` [Bug target/115485] " pinskia at gcc dot gnu.org
@ 2024-06-15  2:00 ` gang.peng at aclsemi dot com
  2024-06-15  3:21 ` pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: gang.peng at aclsemi dot com @ 2024-06-15  2:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Gang Peng <gang.peng at aclsemi dot com> ---
(In reply to Andrew Pinski from comment #4)
> >GNU Arm Embedded Toolchain 10.3-2021.10
> 
> I looked into the official releases of GCC 10.3.0 and arm.c:7855 does not
> correspond to a place where an assert happens. You should file this bug with
> the folks who recieved the binary release from since they have modified the
> sources.
> 
> Also GCC 10.x is no longer supported so can you try a newer version of GCC?
> Like GCC 14.1.0 or 13.3.0?

Dear Mr. Pinski,

Thank you very much for you kindly reply.

I have donwload the GNU Arm Embedded Toolchain 10.3-2021.10 from here:
https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-aarch64-linux.tar.bz2?rev=b748c39178c043b4915b04645d7774d8&hash=9E173D105DC6E0D452EB3A813BF28AAB

So I need report this issue to arm developer?

And I have try the latest GNU Arm Embedded Toolchain 13.2 Rel:
https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-aarch64-arm-none-eabi.tar.xz?rev=17baf091942042768d55c9a304610954&hash=06E4C2BB7EBE7C70EA4EA51ABF9AAE2D


ubuntu240:~/build_code$
/home/gang.peng/arm-none-eabi_v13.2/bin/arm-none-eabi-g++ --version
arm-none-eabi-g++ (Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 13.2.1
20231009
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.

The result is same:
ubuntu240:~/build_code$
/home/gang.peng/arm-none-eabi_v13.2/bin/arm-none-eabi-g++ -MMD -MF
libSecureChannel.CASEServer.cpp.o.d -Wconversion -O3 -g -fno-common
-ffunction-sections -fdata-sections -fno-exceptions -fno-unwind-tables
-fno-asynchronous-unwind-tables -Wall -Werror  -Wextra -Wshadow
-Wunreachable-code -Wvla -Wformat -Wformat-nonliteral -Wformat-security
-Wno-deprecated-declarations -Wno-missing-field-initializers
-Wno-unknown-warning-option -Wno-unused-parameter -Wno-cast-function-type
-Wno-psabi -Wno-maybe-uninitialized -fdiagnostics-color -fno-strict-aliasing
-std=gnu++17 -fno-rtti -Wnon-virtual-dtor -DCHIP_PROJECT=1
-DCHIP_HAVE_CONFIG_H=1 -DCFG_MBEDTLS=0 -DCFG_MBEDTLS_ACCELERATOR=1
-DMBEDTLS_CONFIG_FILE=\"tfm_mbedcrypto_config_profile_medium.h\"
-DCRYPTO_HW_ACCELERATOR -DLWIP_IPV6=1 -DLWIP_IPV6_ND=1 -DLWIP_IPV6_SCOPES=1
-DLWIP_PBUF_FROM_CUSTOM_POOLS=0 -DLWIP_IPV6_ROUTE_TABLE_SUPPORT=1
-DCHIP_DEVICE_LAYER_NONE=0 -DCHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF=0
-DCHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS=0
-DCHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS=0
-DCHIP_SYSTEM_CONFIG_USE_LWIP=1 -DCHIP_SYSTEM_CONFIG_USE_SOCKETS=0
-DCHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK=0
-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=\<lib/address_resolve/AddressResolve_DefaultImpl.h\>
-fPIE -msingle-pic-base -mpic-register=r9 -fomit-frame-pointer
-mno-pic-data-is-text-relative -mthumb -mlong-calls -mcpu=cortex-m33+nodsp
-mfpu=fpv5-sp-d16 -mfloat-abi=hard -mcmse --specs=nosys.specs
--specs=nano.specs -nostdlib  -fno-use-cxa-atexit -Wno-conversion -Wno-error
-Wno-sign-compare -Wno-unused-function -Wno-unused-but-set-variable
-Wno-unused-variable  -Wno-literal-suffix  -fno-builtin-printf
-fno-builtin-sprintf -fno-builtin-snprintf 
-DCHIP_MINMDNS_USE_EPHEMERAL_UNICAST_PORT=0 -DCHIP_MINMDNS_HIGH_VERBOSITY=0
-DCHIP_MINMDNS_DEFAULT_POLICY=1 -Iinclude -Iinclude/include -Iinclude/port
-Iinclude/lib -c CASEServer.cpp -o libSecureChannel.CASEServer.cpp.o
CASEServer.cpp: In member function 'virtual CHIP_ERROR
chip::CASEServer::_ZThn8_N4chip10CASEServer17OnMessageReceivedEPNS_9Messaging15ExchangeContextERKNS_13PayloadHeaderEONS_6System18PacketBufferHandleE(chip::Messaging::ExchangeContext*,
const chip::PayloadHeader&, chip::System::PacketBufferHandle&&)':
CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at
config/arm/arm.cc:8023
  203 | } // namespace chip
      | ^
0x7f495dd8e082 __libc_start_main
        ../csu/libc-start.c:308
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.linaro.org/> for instructions.

Thanks a lot!

BRs
Gang Peng

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

* [Bug target/115485] CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
  2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
                   ` (4 preceding siblings ...)
  2024-06-15  2:00 ` gang.peng at aclsemi dot com
@ 2024-06-15  3:21 ` pinskia at gcc dot gnu.org
  2024-06-15  3:22 ` pinskia at gcc dot gnu.org
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-15  3:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
  if (!crtl->uses_pic_offset_table || compute_now)
    {
      gcc_assert (can_create_pseudo_p ()
                  || (pic_reg != NULL_RTX
                      && REG_P (pic_reg)
                      && GET_MODE (pic_reg) == Pmode));


It has to do with these 2 options:
>  -msingle-pic-base -mpic-register=r9

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

* [Bug target/115485] CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
  2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
                   ` (5 preceding siblings ...)
  2024-06-15  3:21 ` pinskia at gcc dot gnu.org
@ 2024-06-15  3:22 ` pinskia at gcc dot gnu.org
  2024-06-15  6:30 ` gang.peng at aclsemi dot com
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-15  3:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 58435
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58435&action=edit
single file

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

* [Bug target/115485] CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
  2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
                   ` (6 preceding siblings ...)
  2024-06-15  3:22 ` pinskia at gcc dot gnu.org
@ 2024-06-15  6:30 ` gang.peng at aclsemi dot com
  2024-06-20  8:56 ` gang.peng at aclsemi dot com
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: gang.peng at aclsemi dot com @ 2024-06-15  6:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Gang Peng <gang.peng at aclsemi dot com> ---
(In reply to Andrew Pinski from comment #6)
>   if (!crtl->uses_pic_offset_table || compute_now)
>     {
>       gcc_assert (can_create_pseudo_p ()
>                   || (pic_reg != NULL_RTX
>                       && REG_P (pic_reg)
>                       && GET_MODE (pic_reg) == Pmode));
> 
> 
> It has to do with these 2 options:
> >  -msingle-pic-base -mpic-register=r9

Dear Mr. Pinski,

Thank you very much for you kindly reply.
Yes, I need these compile option:
CFLAGS += -fPIE
CFLAGS += -msingle-pic-base
CFLAGS += -mpic-register=r9
CFLAGS += -fomit-frame-pointer
CFLAGS += -mno-pic-data-is-text-relative
CFLAGS += -mthumb
CFLAGS += -mlong-calls 

When we remove the -mlong-calls option, it can compile OK, but we need the
-mlong-calls option to compile.

Thanks &
BRs

Gang Peng

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

* [Bug target/115485] CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
  2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
                   ` (7 preceding siblings ...)
  2024-06-15  6:30 ` gang.peng at aclsemi dot com
@ 2024-06-20  8:56 ` gang.peng at aclsemi dot com
  2024-06-23  0:37 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: gang.peng at aclsemi dot com @ 2024-06-20  8:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Gang Peng <gang.peng at aclsemi dot com> ---
Dear Andrew,

I have compiler the GNU Arm Embedded Toolchain 10.3-2021.10, the call stack is
as follow:

CASEServer.cpp: In member function 'virtual CHIP_ERROR
chip::CASEServer::_ZThn4_N4chip10CASEServer28OnUnsolicitedMessageReceivedERKNS_13PayloadHeaderERPNS_9Messaging16ExchangeDelegateE(const
chip::PayloadHeader&, chip::Messaging::ExchangeDelegate*&)':
CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at
config/arm/arm.c:7852
  203 | } // namespace chip
      | ^
0x152ba73 diagnostic_impl
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/../libcpp/include/line-map.h:1309
0x152c5bc internal_error(char const*, ...)
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/../libcpp/include/line-map.h:1711
0x62f5db fancy_abort(char const*, int, char const*)
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/../libcpp/include/line-map.h:1778
0x622c16 require_pic_register
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/config/arm/thumb1.md:7852
0x622c16 legitimize_pic_address(rtx_def*, machine_mode, rtx_def*, rtx_def*,
bool)
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/config/arm/thumb1.md:7981
0x122373c gen_movsi(rtx_def*, rtx_def*)
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/poly-int.h:6428
0x97c5eb insn_gen_fn::operator()(rtx_def*, rtx_def*) const
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/poly-int.h:317
0x97c5eb emit_move_insn_1(rtx_def*, rtx_def*)
        /home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/expr.c:3759
0x97c993 emit_move_insn(rtx_def*, rtx_def*)
        /home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/expr.c:3855
0xf6efef arm32_output_mi_thunk
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/config/arm/thumb1.md:28546
0xf6efef arm_output_mi_thunk
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/config/arm/thumb1.md:28582
0x8a9bc0 cgraph_node::expand_thunk(bool, bool)
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/cgraphunit.c:1934
0x8aac76 cgraph_node::assemble_thunks_and_aliases()
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/cgraphunit.c:2226
0x8aad15 cgraph_node::assemble_thunks_and_aliases()
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/cgraphunit.c:2248
0x8aaf32 cgraph_node::expand()
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/cgraphunit.c:2369
0x8ac25f expand_all_functions
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/cgraphunit.c:2474
0x8ac25f symbol_table::compile()
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/cgraphunit.c:2837
0x8ae40c symbol_table::compile()
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/cgraphunit.c:2750
0x8ae40c symbol_table::finalize_compilation_unit()
       
/home/grant/Code/gcc-arm-none-eabi-10.3-2021.10/src/gcc/gcc/cgraphunit.c:3017
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Could you kindly help to have a look, how can I fix this issue? Thank you very
mcuh!

BRs
Gang Peng

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

* [Bug target/115485] CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
  2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
                   ` (8 preceding siblings ...)
  2024-06-20  8:56 ` gang.peng at aclsemi dot com
@ 2024-06-23  0:37 ` pinskia at gcc dot gnu.org
  2024-06-23  5:13 ` gang.peng at aclsemi dot com
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-23  0:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you provide the preprocessed source (which you can get via -save-temps)?
This is mentioned in https://gcc.gnu.org/bugs/ on what we require.

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

* [Bug target/115485] CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
  2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
                   ` (9 preceding siblings ...)
  2024-06-23  0:37 ` pinskia at gcc dot gnu.org
@ 2024-06-23  5:13 ` gang.peng at aclsemi dot com
  2024-06-23  5:14 ` gang.peng at aclsemi dot com
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: gang.peng at aclsemi dot com @ 2024-06-23  5:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Gang Peng <gang.peng at aclsemi dot com> ---
(In reply to Andrew Pinski from comment #10)
> Can you provide the preprocessed source (which you can get via -save-temps)?
> This is mentioned in https://gcc.gnu.org/bugs/ on what we require.

Dear Andrew,

Thank you very much for your kindly reply.

Attached is the build log with -save-temps, If need any other info, please feel
free to let me know.

Thanks &
BRs

Gang Peng

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

* [Bug target/115485] CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
  2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
                   ` (10 preceding siblings ...)
  2024-06-23  5:13 ` gang.peng at aclsemi dot com
@ 2024-06-23  5:14 ` gang.peng at aclsemi dot com
  2024-06-23 18:47 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: gang.peng at aclsemi dot com @ 2024-06-23  5:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Gang Peng <gang.peng at aclsemi dot com> ---
Created attachment 58495
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58495&action=edit
build_save_temp_log.tar.gz

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

* [Bug target/115485] CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
  2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
                   ` (11 preceding siblings ...)
  2024-06-23  5:14 ` gang.peng at aclsemi dot com
@ 2024-06-23 18:47 ` pinskia at gcc dot gnu.org
  2024-06-23 23:59 ` [Bug target/115485] [11/12/13/14/15 Regression] " pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-23 18:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can reproduce on the trunk too:
```
[apinski@xeond2 gcc]$ ./cc1plus CASEServer.ii -quiet  -fPIE -msingle-pic-base
-mpic-register=r9 -fomit-frame-pointer -mno-pic-data-is-text-relative -mthumb
-mlong-calls -mcpu=cortex-m33+nodsp -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mcmse
-Os -g -fno-use-cxa-atexit -fno-builtin-printf -fno-builtin-sprintf
-fno-builtin-snprintf -fno-common -ffunction-sections -fdata-sections
-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
CASEServer.cpp: In member function ‘virtual CHIP_ERROR
chip::CASEServer::_ZThn4_N4chip10CASEServer28OnUnsolicitedMessageReceivedERKNS_13PayloadHeaderERPNS_9Messaging16ExchangeDelegateE(const
chip::PayloadHeader&, chip::Messaging::ExchangeDelegate*&)’:
CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at
config/arm/arm.cc:8103
  203 | } // namespace chip
      | ^
0x1ef29a4 require_pic_register
        ../../gcc/config/arm/arm.cc:8103
0x1ef304f legitimize_pic_address(rtx_def*, machine_mode, rtx_def*, rtx_def*,
bool)
        ../../gcc/config/arm/arm.cc:8232
0x289d5ba gen_movsi(rtx_def*, rtx_def*)
        ../../gcc/config/arm/arm.md:6532
0x12ced5e rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*,
rtx_def*) const
        ../../gcc/recog.h:441
0x1490ab7 emit_move_insn_1(rtx_def*, rtx_def*)
        ../../gcc/expr.cc:4556
0x149155e emit_move_insn(rtx_def*, rtx_def*)
        ../../gcc/expr.cc:4726
0x1f30a44 arm32_output_mi_thunk
        ../../gcc/config/arm/arm.cc:29405
0x1f30bf1 arm_output_mi_thunk
        ../../gcc/config/arm/arm.cc:29443
0x1347dd8 expand_thunk(cgraph_node*, bool, bool)
        ../../gcc/symtab-thunks.cc:388
0x1363ddb cgraph_node::assemble_thunks_and_aliases()
        ../../gcc/cgraphunit.cc:1767
0x1363ec4 cgraph_node::assemble_thunks_and_aliases()
        ../../gcc/cgraphunit.cc:1789
0x1364518 cgraph_node::expand()
        ../../gcc/cgraphunit.cc:1918
0x1364922 expand_all_functions
        ../../gcc/cgraphunit.cc:2028
0x1365573 symbol_table::compile()
        ../../gcc/cgraphunit.cc:2404
0x13659fd symbol_table::finalize_compilation_unit()
        ../../gcc/cgraphunit.cc:2589
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.

```

Reducing ...

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

* [Bug target/115485] [11/12/13/14/15 Regression] CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
  2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
                   ` (12 preceding siblings ...)
  2024-06-23 18:47 ` pinskia at gcc dot gnu.org
@ 2024-06-23 23:59 ` pinskia at gcc dot gnu.org
  2024-06-24  0:09 ` pinskia at gcc dot gnu.org
  2024-06-24 11:34 ` gang.peng at aclsemi dot com
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-23 23:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |6.4.0
             Status|UNCONFIRMED                 |NEW
            Summary|CASEServer.cpp:203:1:       |[11/12/13/14/15 Regression]
                   |internal compiler error: in |CASEServer.cpp:203:1:
                   |require_pic_register, at    |internal compiler error: in
                   |config/arm/arm.c:7855       |require_pic_register, at
                   |                            |config/arm/arm.c:7855
   Last reconfirmed|                            |2024-06-23
      Known to fail|                            |7.1.0, 9.5.0
     Ever confirmed|0                           |1
   Target Milestone|---                         |11.5

--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase:
```
struct c1 {
  virtual void func1() = 0;
};
struct  c2 {
  virtual ~c2() {}
};
struct c3 : c2, c1 {
  void func1() override;
  void func3();
};
void c3::func1() {
  func3();
}
```

Options needed to get the ICE:
```
-fPIE -mno-pic-data-is-text-relative  -mlong-calls  -ffunction-sections
```

The ICE started in GCC 7.x.

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

* [Bug target/115485] [11/12/13/14/15 Regression] CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
  2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
                   ` (13 preceding siblings ...)
  2024-06-23 23:59 ` [Bug target/115485] [11/12/13/14/15 Regression] " pinskia at gcc dot gnu.org
@ 2024-06-24  0:09 ` pinskia at gcc dot gnu.org
  2024-06-24 11:34 ` gang.peng at aclsemi dot com
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-24  0:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Most likely r7-1945-gb88bd5e0ca1208 introduced/exposed the ICE. It changes the
behavior of -mno-pic-data-is-text-relative but adding -msingle-pic-base didn't
ICE in GCC 6.

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

* [Bug target/115485] [11/12/13/14/15 Regression] CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855
  2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
                   ` (14 preceding siblings ...)
  2024-06-24  0:09 ` pinskia at gcc dot gnu.org
@ 2024-06-24 11:34 ` gang.peng at aclsemi dot com
  15 siblings, 0 replies; 17+ messages in thread
From: gang.peng at aclsemi dot com @ 2024-06-24 11:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Gang Peng <gang.peng at aclsemi dot com> ---
(In reply to Andrew Pinski from comment #15)
> Most likely r7-1945-gb88bd5e0ca1208 introduced/exposed the ICE. It changes
> the behavior of -mno-pic-data-is-text-relative but adding -msingle-pic-base
> didn't ICE in GCC 6.

Dear Andrew,

Thank you very much for your kindly reply.

So can I revert this change, and rebuild the toolchain to test it?

Thanks &
BRs

Gang Peng

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

end of thread, other threads:[~2024-06-24 11:34 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-14  5:40 [Bug c++/115485] New: CASEServer.cpp:203:1: internal compiler error: in require_pic_register, at config/arm/arm.c:7855 gang.peng at aclsemi dot com
2024-06-14  5:51 ` [Bug c++/115485] " gang.peng at aclsemi dot com
2024-06-14  5:52 ` gang.peng at aclsemi dot com
2024-06-14  5:59 ` gang.peng at aclsemi dot com
2024-06-14 23:30 ` [Bug target/115485] " pinskia at gcc dot gnu.org
2024-06-15  2:00 ` gang.peng at aclsemi dot com
2024-06-15  3:21 ` pinskia at gcc dot gnu.org
2024-06-15  3:22 ` pinskia at gcc dot gnu.org
2024-06-15  6:30 ` gang.peng at aclsemi dot com
2024-06-20  8:56 ` gang.peng at aclsemi dot com
2024-06-23  0:37 ` pinskia at gcc dot gnu.org
2024-06-23  5:13 ` gang.peng at aclsemi dot com
2024-06-23  5:14 ` gang.peng at aclsemi dot com
2024-06-23 18:47 ` pinskia at gcc dot gnu.org
2024-06-23 23:59 ` [Bug target/115485] [11/12/13/14/15 Regression] " pinskia at gcc dot gnu.org
2024-06-24  0:09 ` pinskia at gcc dot gnu.org
2024-06-24 11:34 ` gang.peng at aclsemi dot com

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).