Bug 55143 - vms-c.o:(.toc+0x0): undefined reference to `c_default_pointer_mode' (building cc1plus)
Summary: vms-c.o:(.toc+0x0): undefined reference to `c_default_pointer_mode' (building...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: 5.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build
: 58765 (view as bug list)
Depends on:
Blocks: 47093
  Show dependency treegraph
 
Reported: 2012-10-31 03:35 UTC by Jorn Wolfgang Rennecke
Modified: 2021-08-26 05:26 UTC (History)
11 users (show)

See Also:
Host:
Target: alpha-dec-vms, alpha64-dec-vms, ia64-hp-vms
Build:
Known to work: 5.0
Known to fail:
Last reconfirmed: 2015-04-08 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jorn Wolfgang Rennecke 2012-10-31 03:35:24 UTC
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]$
Comment 1 Martin Liška 2014-07-31 20:58:01 UTC
Problem is still present in 4.10.0.
Comment 2 Jan-Benedict Glaw 2014-08-27 02:12:05 UTC
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
Comment 3 Bernhard Reutner-Fischer 2015-04-08 19:04:28 UTC
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
Comment 4 Bernhard Reutner-Fischer 2015-04-10 07:55:18 UTC
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
Comment 5 Bernhard Reutner-Fischer 2015-04-10 08:06:30 UTC
Fixed on the trunk for 5.0.

Eventual backport including beef-up of the impl is left to the port maintainers.
Comment 6 Jeffrey A. Law 2016-02-04 07:15:40 UTC
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.
Comment 7 Eric Gallager 2018-05-07 20:24:36 UTC
(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.
Comment 8 Andrew Pinski 2021-08-26 05:26:23 UTC
*** Bug 58765 has been marked as a duplicate of this bug. ***