public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/61192] New: Conflict between register and function name for lto on sparc
@ 2014-05-15 9:53 cederman at gaisler dot com
2014-05-15 10:05 ` [Bug lto/61192] " rguenth at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: cederman at gaisler dot com @ 2014-05-15 9:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61192
Bug ID: 61192
Summary: Conflict between register and function name for lto on
sparc
Product: gcc
Version: 4.9.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: cederman at gaisler dot com
Created attachment 32799
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32799&action=edit
Preprocessed files
This line in the attached preprocessed file:
register struct Per_CPU_Control *_SPARC_Per_CPU_current __asm__( "g6" );
seems to conflict with this line:
int g6() {}
when using lto on sparc. If I change the function name I get no error. If I
change both the register and the function name to g5 instead I get the same
error.
$ sparc-rtems-gcc -v bug.i -flto -flto-partition=none -O2
Using built-in specs.
COLLECT_GCC=sparc-rtems-gcc
COLLECT_LTO_WRAPPER=/opt/rtems-4.11/libexec/gcc/sparc-rtems/4.9.1/lto-wrapper
Target: sparc-rtems
Configured with: ../../gcc/configure --target=sparc-rtems --with-gnu-as
--with-gnu-ld --with-newlib --verbose --enable-threads --enable-languages=c,c++
--disable-nls --prefix=/opt/rtems-4.11 --enable-version-specific-runtime-libs
--with-system-zlib --disable-libstdcxx-pch --disable-win32-registry
--without-included-gettext
Thread model: rtems
gcc version 4.9.1 20140515 (prerelease) (GCC)
COLLECT_GCC_OPTIONS='-v' '-flto' '-flto-partition=none' '-O2' '-mcpu=v7'
/opt/rtems-4.11/libexec/gcc/sparc-rtems/4.9.1/cc1 -fpreprocessed bug.i -quiet
-dumpbase bug.i -mcpu=v7 -auxbase bug -O2 -version -flto -flto-partition=none
-o /tmp/cczGxKWE.s
GNU C (GCC) version 4.9.1 20140515 (prerelease) (sparc-rtems)
compiled by GNU C version 4.6.3, GMP version 5.0.5, MPFR version 3.1.1, MPC
version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (GCC) version 4.9.1 20140515 (prerelease) (sparc-rtems)
compiled by GNU C version 4.6.3, GMP version 5.0.5, MPFR version 3.1.1, MPC
version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 86c088340ea65899e71f0200a3b56ac7
In file included from
/opt/rtems-4.11/sparc-rtems/leon3/lib/include/rtems/score/cpuatomic.h:12:0,
from
/opt/rtems-4.11/sparc-rtems/leon3/lib/include/rtems/score/atomic.h:21,
from
/opt/rtems-4.11/sparc-rtems/leon3/lib/include/rtems/score/smplock.h:27,
from
/opt/rtems-4.11/sparc-rtems/leon3/lib/include/rtems/score/percpu.h:28,
from
/opt/rtems-4.11/sparc-rtems/leon3/lib/include/rtems/system.h:23,
from /opt/rtems-4.11/sparc-rtems/leon3/lib/include/rtems.h:29,
from bug.c:1:
/opt/rtems-4.11/sparc-rtems/leon3/lib/include/rtems/score/cpustdatomic.h: In
function '_CPU_atomic_Store_ptr':
/opt/rtems-4.11/sparc-rtems/leon3/lib/include/rtems/score/cpustdatomic.h:179:117:
warning: initialization makes integer from pointer without a cast
atomic_store_explicit( object, pointer, (memory_order) order );
^
In file included from
/opt/rtems-4.11/sparc-rtems/leon3/lib/include/rtems/score/cpuatomic.h:12:0,
from
/opt/rtems-4.11/sparc-rtems/leon3/lib/include/rtems/score/atomic.h:21,
from
/opt/rtems-4.11/sparc-rtems/leon3/lib/include/rtems/score/smplock.h:27,
from
/opt/rtems-4.11/sparc-rtems/leon3/lib/include/rtems/score/percpu.h:28,
from
/opt/rtems-4.11/sparc-rtems/leon3/lib/include/rtems/system.h:23,
from /opt/rtems-4.11/sparc-rtems/leon3/lib/include/rtems.h:29,
from bug.c:1:
/opt/rtems-4.11/sparc-rtems/leon3/lib/include/rtems/score/cpustdatomic.h: In
function '_CPU_atomic_Compare_exchange_ptr':
/opt/rtems-4.11/sparc-rtems/leon3/lib/include/rtems/score/cpustdatomic.h:412:157:
warning: initialization makes integer from pointer without a cast
return atomic_compare_exchange_strong_explicit( object, old_pointer,
^
COLLECT_GCC_OPTIONS='-v' '-flto' '-flto-partition=none' '-O2' '-mcpu=v7'
/opt/rtems-4.11/lib/gcc/sparc-rtems/4.9.1/../../../../sparc-rtems/bin/as -v -s
-o /tmp/ccurbDPh.o /tmp/cczGxKWE.s
GNU assembler version 2.23.52 (sparc-rtems) using BFD version (GNU Binutils)
2.23.52.20130918
COMPILER_PATH=/opt/rtems-4.11/libexec/gcc/sparc-rtems/4.9.1/:/opt/rtems-4.11/libexec/gcc/sparc-rtems/4.9.1/:/opt/rtems-4.11/libexec/gcc/sparc-rtems/:/opt/rtems-4.11/lib/gcc/sparc-rtems/4.9.1/:/opt/rtems-4.11/lib/gcc/sparc-rtems/:/opt/rtems-4.11/lib/gcc/sparc-rtems/4.9.1/../../../../sparc-rtems/bin/
LIBRARY_PATH=/opt/rtems-4.11/lib/gcc/sparc-rtems/4.9.1/:/opt/rtems-4.11/lib/gcc/sparc-rtems/4.9.1/../../../../sparc-rtems/lib/
COLLECT_GCC_OPTIONS='-v' '-flto' '-flto-partition=none' '-O2' '-mcpu=v7'
/opt/rtems-4.11/libexec/gcc/sparc-rtems/4.9.1/collect2 -plugin
/opt/rtems-4.11/libexec/gcc/sparc-rtems/4.9.1/liblto_plugin.so
-plugin-opt=/opt/rtems-4.11/libexec/gcc/sparc-rtems/4.9.1/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccTxagKU.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -flto
/opt/rtems-4.11/lib/gcc/sparc-rtems/4.9.1/../../../../sparc-rtems/lib/crt0.o
-L/opt/rtems-4.11/lib/gcc/sparc-rtems/4.9.1
-L/opt/rtems-4.11/lib/gcc/sparc-rtems/4.9.1/../../../../sparc-rtems/lib
/tmp/ccurbDPh.o -lgcc -lc -lgcc
sparc-rtems-gcc @/tmp/ccQnKVTo.args
Using built-in specs.
COLLECT_GCC=sparc-rtems-gcc
Target: sparc-rtems
Configured with: ../../gcc/configure --target=sparc-rtems --with-gnu-as
--with-gnu-ld --with-newlib --verbose --enable-threads --enable-languages=c,c++
--disable-nls --prefix=/opt/rtems-4.11 --enable-version-specific-runtime-libs
--with-system-zlib --disable-libstdcxx-pch --disable-win32-registry
--without-included-gettext
Thread model: rtems
gcc version 4.9.1 20140515 (prerelease) (GCC)
COLLECT_GCC_OPTIONS='-c' '-fno-trapv' '-mcpu=v7' '-O2' '-v'
'-flto-partition=none' '-O2' '-mcpu=v7' '-o' '/tmp/ccmVflYL.lto.o'
'-fresolution=/tmp/ccTxagKU.res'
/opt/rtems-4.11/libexec/gcc/sparc-rtems/4.9.1/lto1 -quiet -dumpbase ccurbDPh.o
-mcpu=v7 -mcpu=v7 -auxbase-strip /tmp/ccmVflYL.lto.o -O2 -O2 -version
-fno-trapv -flto-partition=none -fresolution=/tmp/ccTxagKU.res @/tmp/ccl6rwAL
-o /tmp/ccsAdpwo.s
GNU GIMPLE (GCC) version 4.9.1 20140515 (prerelease) (sparc-rtems)
compiled by GNU C version 4.6.3, GMP version 5.0.5, MPFR version 3.1.1, MPC
version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU GIMPLE (GCC) version 4.9.1 20140515 (prerelease) (sparc-rtems)
compiled by GNU C version 4.6.3, GMP version 5.0.5, MPFR version 3.1.1, MPC
version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
/opt/rtems-4.11/sparc-rtems/include/sys/reent.h: In function '__getreent':
/opt/rtems-4.11/sparc-rtems/include/sys/reent.h:771:19: internal compiler
error: in copy_reference_ops_from_ref, at tree-ssa-sccvn.c:906
struct _reent * _EXFUN(__getreent, (void));
^
0x89951d copy_reference_ops_from_ref(tree_node*, vec<vn_reference_op_struct,
va_heap, vl_ptr>*)
../../../gcc/gcc/tree-ssa-sccvn.c:906
0x89ae67 valueize_shared_reference_ops_from_ref
../../../gcc/gcc/tree-ssa-sccvn.c:1425
0x89bf22 vn_reference_lookup(tree_node*, tree_node*, vn_lookup_kind,
vn_reference_s**)
../../../gcc/gcc/tree-ssa-sccvn.c:2061
0x89e4be visit_reference_op_load
../../../gcc/gcc/tree-ssa-sccvn.c:2848
0x8a01e9 visit_use
../../../gcc/gcc/tree-ssa-sccvn.c:3544
0x8a225e process_scc
../../../gcc/gcc/tree-ssa-sccvn.c:3741
0x8a225e extract_and_process_scc_for_name
../../../gcc/gcc/tree-ssa-sccvn.c:3825
0x8a225e DFS
../../../gcc/gcc/tree-ssa-sccvn.c:3877
0x8a225e run_scc_vn(vn_lookup_kind)
../../../gcc/gcc/tree-ssa-sccvn.c:4120
0x87eaf9 execute_fre
../../../gcc/gcc/tree-ssa-pre.c:4839
0x87eaf9 execute
../../../gcc/gcc/tree-ssa-pre.c:4890
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.
lto-wrapper: sparc-rtems-gcc returned 1 exit status
/opt/rtems-4.11/lib/gcc/sparc-rtems/4.9.1/../../../../sparc-rtems/bin/ld:
lto-wrapper failed
collect2: error: ld returned 1 exit status
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/61192] Conflict between register and function name for lto on sparc
2014-05-15 9:53 [Bug lto/61192] New: Conflict between register and function name for lto on sparc cederman at gaisler dot com
@ 2014-05-15 10:05 ` rguenth at gcc dot gnu.org
2014-10-20 11:24 ` i.palachev at samsung dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-05-15 10:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61192
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
This looks like a symtab issue to me. Honza?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/61192] Conflict between register and function name for lto on sparc
2014-05-15 9:53 [Bug lto/61192] New: Conflict between register and function name for lto on sparc cederman at gaisler dot com
2014-05-15 10:05 ` [Bug lto/61192] " rguenth at gcc dot gnu.org
@ 2014-10-20 11:24 ` i.palachev at samsung dot com
2014-10-20 14:48 ` cederman at gaisler dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: i.palachev at samsung dot com @ 2014-10-20 11:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61192
Ilya Palachev <i.palachev at samsung dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |i.palachev at samsung dot com
--- Comment #2 from Ilya Palachev <i.palachev at samsung dot com> ---
(In reply to Daniel Cederman from comment #0)
> when using lto on sparc.
Daniel, can you also provide original source code (not preprocessed)? It's
interesting whether this error can be reproduced on other arhictectures.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/61192] Conflict between register and function name for lto on sparc
2014-05-15 9:53 [Bug lto/61192] New: Conflict between register and function name for lto on sparc cederman at gaisler dot com
2014-05-15 10:05 ` [Bug lto/61192] " rguenth at gcc dot gnu.org
2014-10-20 11:24 ` i.palachev at samsung dot com
@ 2014-10-20 14:48 ` cederman at gaisler dot com
2021-12-24 10:32 ` [Bug middle-end/61192] " pinskia at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cederman at gaisler dot com @ 2014-10-20 14:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61192
--- Comment #3 from Daniel Cederman <cederman at gaisler dot com> ---
(In reply to Ilya Palachev from comment #2)
> (In reply to Daniel Cederman from comment #0)
> > when using lto on sparc.
>
> Daniel, can you also provide original source code (not preprocessed)? It's
> interesting whether this error can be reproduced on other arhictectures.
I used creduce on the source code and this code triggers the error:
register int _SPARC_Per_CPU_current __asm__("g6");
int __getreent___trans_tmp_1;
__getreent() {
int cpu_self = _SPARC_Per_CPU_current;
__getreent___trans_tmp_1 = cpu_self;
}
g6() {}
I compiled with the same compiler as before, I have not tried with a newer
version of gcc.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/61192] Conflict between register and function name for lto on sparc
2014-05-15 9:53 [Bug lto/61192] New: Conflict between register and function name for lto on sparc cederman at gaisler dot com
` (2 preceding siblings ...)
2014-10-20 14:48 ` cederman at gaisler dot com
@ 2021-12-24 10:32 ` pinskia at gcc dot gnu.org
2021-12-24 10:34 ` [Bug middle-end/61192] Conflict between global register and function name pinskia at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-24 10:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61192
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-12-24
Known to fail| |9.1.0
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Keywords|lto |ice-checking,
| |ice-on-valid-code
Component|lto |middle-end
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed here is a testcase for x86_64:
register int hh __asm__("r14");
int jj;
__getreent() {
int cpu_self = hh;
jj = cpu_self;
}
int r14() {}
----- CUT ----
Here is the ICE we get on the trunk (and all the way down to GCC 9, GCC 8 does
not to ICE with -fchecking):
<source>:9:1: error: assembler name hash list corrupted
9 | int r14() {}
| ^~~
*r14/0 (hh) @0x7f0e412d1000
Type: variable definition analyzed
Visibility: force_output semantic_interposition no_reorder public
References:
Referring: __getreent/2 (read)
Availability: not-ready
Varpool flags:
<source>:9:1: internal compiler error: symtab_node::verify failed
0x1e454c9 internal_error(char const*, ...)
???:0
0x900b69 symtab_node::verify()
???:0
0x9020e7 symtab_node::verify_symtab_nodes()
???:0
0x91e9bf symbol_table::finalize_compilation_unit()
???:0
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.
Compiler returned: 1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/61192] Conflict between global register and function name
2014-05-15 9:53 [Bug lto/61192] New: Conflict between register and function name for lto on sparc cederman at gaisler dot com
` (3 preceding siblings ...)
2021-12-24 10:32 ` [Bug middle-end/61192] " pinskia at gcc dot gnu.org
@ 2021-12-24 10:34 ` pinskia at gcc dot gnu.org
2023-10-18 18:54 ` pinskia at gcc dot gnu.org
2023-10-18 18:55 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-24 10:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61192
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |cnsun at uwaterloo dot ca
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 100888 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/61192] Conflict between global register and function name
2014-05-15 9:53 [Bug lto/61192] New: Conflict between register and function name for lto on sparc cederman at gaisler dot com
` (4 preceding siblings ...)
2021-12-24 10:34 ` [Bug middle-end/61192] Conflict between global register and function name pinskia at gcc dot gnu.org
@ 2023-10-18 18:54 ` pinskia at gcc dot gnu.org
2023-10-18 18:55 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-18 18:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61192
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |141242068 at smail dot nju.edu.cn
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 111865 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/61192] Conflict between global register and function name
2014-05-15 9:53 [Bug lto/61192] New: Conflict between register and function name for lto on sparc cederman at gaisler dot com
` (5 preceding siblings ...)
2023-10-18 18:54 ` pinskia at gcc dot gnu.org
@ 2023-10-18 18:55 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-18 18:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61192
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 56144
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56144&action=edit
Another testcase
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-10-18 18:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-15 9:53 [Bug lto/61192] New: Conflict between register and function name for lto on sparc cederman at gaisler dot com
2014-05-15 10:05 ` [Bug lto/61192] " rguenth at gcc dot gnu.org
2014-10-20 11:24 ` i.palachev at samsung dot com
2014-10-20 14:48 ` cederman at gaisler dot com
2021-12-24 10:32 ` [Bug middle-end/61192] " pinskia at gcc dot gnu.org
2021-12-24 10:34 ` [Bug middle-end/61192] Conflict between global register and function name pinskia at gcc dot gnu.org
2023-10-18 18:54 ` pinskia at gcc dot gnu.org
2023-10-18 18:55 ` 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).