public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/61713] New: 4.9 ICE when building c++ code with atomic functions for thumb1 target
@ 2014-07-04  6:40 tony.wang at arm dot com
  2014-07-04  7:07 ` [Bug target/61713] " tony.wang at arm dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: tony.wang at arm dot com @ 2014-07-04  6:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61713
           Summary: 4.9 ICE when building c++ code with atomic functions
                    for thumb1 target
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tony.wang at arm dot com

The tool chain is built from:
gcc version 4.9.1 20140630 (prerelease) [gcc-4_9-branch revision 212159]
when compile below code, there will be ICE.
int main()
{
  typedef bool atomic_type;
  atomic_type c1;
  atomic_type c2;
  atomic_type c3(0);
  __atomic_fetch_add(&c1, c2, __ATOMIC_RELAXED);
  __atomic_compare_exchange_n(&c1, &c2, c3, true, __ATOMIC_ACQ_REL,
                              __ATOMIC_RELAXED);
  __atomic_test_and_set(&c1, __ATOMIC_RELAXED);
  __atomic_load_n(&c1, __ATOMIC_RELAXED);

  return 0;
}
Remember to save it as a c++ source file. For the debuggabe gcc, the ICE is:
at1.cpp: In function 'int main()':
at1.cpp:12:47: internal compiler error: in emit_move_insn, at expr.c:3609
__atomic_test_and_set(&c1, __ATOMIC_RELAXED);
^
0x83c8240 emit_move_insn(rtx_def*, rtx_def*)
/home/build/temp/gcc-arm-none-eabi-4_9-2014q3-20140701/src/gcc/gcc/expr.c:3608
0x850f85d expand_atomic_test_and_set(rtx_def*, rtx_def*, memmodel)
/home/build/temp/gcc-arm-none-eabi-4_9-2014q3-20140701/src/gcc/gcc/optabs.c:7337
0x82ee779 expand_builtin_atomic_test_and_set
/home/build/temp/gcc-arm-none-eabi-4_9-2014q3-20140701/src/gcc/gcc/builtins.c:5552
0x82ee779 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
/home/build/temp/gcc-arm-none-eabi-4_9-2014q3-20140701/src/gcc/gcc/builtins.c:6781
0x83c3382 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/build/temp/gcc-arm-none-eabi-4_9-2014q3-20140701/src/gcc/gcc/expr.c:10327
0x830bd38 expand_expr
/home/build/temp/gcc-arm-none-eabi-4_9-2014q3-20140701/src/gcc/gcc/expr.h:457
0x830bd38 expand_call_stmt
/home/build/temp/gcc-arm-none-eabi-4_9-2014q3-20140701/src/gcc/gcc/cfgexpand.c:2275
0x830bd38 expand_gimple_stmt_1
/home/build/temp/gcc-arm-none-eabi-4_9-2014q3-20140701/src/gcc/gcc/cfgexpand.c:3170
0x830bd38 expand_gimple_stmt
/home/build/temp/gcc-arm-none-eabi-4_9-2014q3-20140701/src/gcc/gcc/cfgexpand.c:3322
0x830c896 expand_gimple_basic_block
/home/build/temp/gcc-arm-none-eabi-4_9-2014q3-20140701/src/gcc/gcc/cfgexpand.c:5162
0x830ebae gimple_expand_cfg
/home/build/temp/gcc-arm-none-eabi-4_9-2014q3-20140701/src/gcc/gcc/cfgexpand.c:5741
0x830ebae execute
/home/build/temp/gcc-arm-none-eabi-4_9-2014q3-20140701/src/gcc/gcc/cfgexpand.c:5961
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
For the release version gcc, the ICE is:
build@build-desktop:~/temp/gcc-arm-none-eabi-4_9-2014q3-20140701/case$
../install-native/bin/arm-none-eabi-g++ -mthumb -O0 at1.cpp -S
at1.cpp: In function 'int main()':
at1.cpp:12:47: internal compiler error: in emit_move_insn, at expr.c:3609
__atomic_test_and_set(&c1, __ATOMIC_RELAXED);
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

end of thread, other threads:[~2021-11-29  7:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-04  6:40 [Bug target/61713] New: 4.9 ICE when building c++ code with atomic functions for thumb1 target tony.wang at arm dot com
2014-07-04  7:07 ` [Bug target/61713] " tony.wang at arm dot com
2014-07-04  7:47 ` zhenqiang.chen at linaro dot org
2014-07-10  8:09 ` ktkachov at gcc dot gnu.org
2014-07-10  8:11 ` ktkachov at gcc dot gnu.org
2014-08-04 10:04 ` ktkachov at gcc dot gnu.org
2014-08-10 23:03 ` yroux at gcc dot gnu.org
2014-08-14  9:32 ` ktkachov at gcc dot gnu.org
2014-10-16 16:18 ` ktkachov at gcc dot gnu.org
2021-11-29  7:32 ` 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).