This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/61192] New: Conflict between register and function name for lto on sparc


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]