g++ -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -o cc1plus \ cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o cp/ptree.o cp/rtti.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o cp/optimize.o cp/mangle.o cp/cp-objcp-common.o cp/name-lookup.o cp/cxx-pretty-print.o cp/cp-gimplify.o attribs.o incpath.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o tree-mudflap.o vms-c.o default-c.o cc1plus-checksum.o libbackend.a main.o tree-browser.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -L/opt/cfarm/mpc/lib -lmpc -lmpfr -lgmp -rdynamic -ldl -L../zlib -lz vms-c.o:(.toc+0x0): undefined reference to `c_default_pointer_mode' collect2: error: ld returned 1 exit status make[1]: *** [cc1plus] Error 1 make[1]: Leaving directory `/home/amylaar/multi/alpha-dec-vms/gcc' make: *** [all-gcc] Error 2 [amylaar@gcc1-power7 alpha-dec-vms]$
Problem is still present in 4.10.0.
With today's GCC (2014-08-26, r214550, build http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=347199), this is still present: g++ -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -o cc1plus \ cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o cp/ptree.o cp/rtti.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o cp/optimize.o cp/mangle.o cp/cp-objcp-common.o cp/name-lookup.o cp/cxx-pretty-print.o cp/cp-cilkplus.o cp/cp-gimplify.o cp/cp-array-notation.o cp/lambda.o cp/vtable-class-hierarchy.o attribs.o incpath.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-cilkplus.o c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o vms-c.o default-c.o cc1plus-checksum.o libbackend.a main.o tree-browser.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -L/opt/cfarm/mpc/lib -lmpc -lmpfr -lgmp -rdynamic -ldl -L../zlib -lz /usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 and 3 information. vms-c.o: In function `handle_pragma_pointer_size(char const*)': vms-c.c:(.text+0x6cd): undefined reference to `c_default_pointer_mode' /usr/bin/ld: Dwarf Error: found dwarf version '0', this reader only handles version 2 and 3 information. vms-c.c:(.text+0x6e2): undefined reference to `c_default_pointer_mode' /usr/bin/ld: Dwarf Error: found dwarf version '17874', this reader only handles version 2 and 3 information. vms-c.c:(.text+0x6fa): undefined reference to `c_default_pointer_mode' /usr/bin/ld: Dwarf Error: found dwarf version '33796', this reader only handles version 2 and 3 information. vms-c.c:(.text+0x718): undefined reference to `c_default_pointer_mode' /usr/bin/ld: Dwarf Error: found dwarf version '22528', this reader only handles version 2 and 3 information. vms-c.o: In function `vms_c_common_override_options()': vms-c.c:(.text+0x9fc): undefined reference to `c_default_pointer_mode' /usr/bin/ld: Dwarf Error: found dwarf version '12288', this reader only handles version 2 and 3 information. vms-c.o:vms-c.c:(.text+0xa12): more undefined references to `c_default_pointer_mode' follow collect2: error: ld returned 1 exit status make[2]: *** [cc1plus] Error 1
Confirmed with trunk@221914. c/c-decl.o gets linked into cc1 but not into cc1plus. Sounds like c_default_pointer_mode should be moved to e.g. c-family/c-common.c
Author: aldot Date: Fri Apr 10 07:54:46 2015 New Revision: 221968 URL: https://gcc.gnu.org/viewcvs?rev=221968&root=gcc&view=rev Log: PR target/55143: undefined reference to c_default_pointer_mode for all-gcc on ia64-hp-vms gcc/c/ChangeLog: 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org> PR target/55143 * c-decl.c (c_default_pointer_mode): Remove definition. * c-tree.h (c_default_pointer_mode): Remove declaration. gcc/c-family/ChangeLog: 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org> PR target/55143 * c-common.c (c_default_pointer_mode): Add definition. * c-common.h (c_default_pointer_mode): Add declaration. Modified: trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-common.c trunk/gcc/c-family/c-common.h trunk/gcc/c/ChangeLog trunk/gcc/c/c-decl.c trunk/gcc/c/c-tree.h
Fixed on the trunk for 5.0. Eventual backport including beef-up of the impl is left to the port maintainers.
Thanks Bernhard -- It was a mistake to add this to the Cilk+ tracker. I was on the road with a single screen, which probably isn't the best time to create a tracker bug then walk through the various potentials to see which really belong on the tracker. I've removed 55143 from the Cilk+ tracker bug.
(In reply to Bernhard Reutner-Fischer from comment #5) > Fixed on the trunk for 5.0. > > Eventual backport including beef-up of the impl is left to the port > maintainers. No previous branches are open for backports so this is fixed for all open branches.
*** Bug 58765 has been marked as a duplicate of this bug. ***