public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* C++ Issue on GCC 3.0 branch
@ 2001-04-20  9:47 Jeffrey A Law
  0 siblings, 0 replies; 186+ messages in thread
From: Jeffrey A Law @ 2001-04-20  9:47 UTC (permalink / raw)
  To: gcc

A few of the remaining failures for PA32 using static libraries are
multiply defined symbols -- in each case one or more symbols defined by
the main program is a duplicate of a symbol in libstdc++.

For example, compiling g++.law/cvt2.C results in about a dozen duplicate
symbols (output has been massaged to be easier to read).

"std::istream::~istream()" in files cvt.o and libstdc++.a (misc-inst.o)

Similarly for the following symbols:

"std::basic_ios<char, std::char_traits<char> >::~basic_ios()"
"std::basic_ifstream<char, std::char_traits<char> >::~basic_ifstream()"
"std::basic_ios<char, std::char_traits<char> >::~basic_ios()"
"std::basic_ifstream<char, std::char_traits<char> >::basic_ifstream(char 
const*, std::_Ios_Openmode)"

[ ... ]

I'm not enough of a C++ guru to know where to start with this one, so any
help y'all could provide would be greatly appreciated.

jeff



^ permalink raw reply	[flat|nested] 186+ messages in thread
* Re: C++ Issue on GCC 3.0 branch
@ 2001-04-20 21:29 John David Anglin
  2001-04-20 21:31 ` David Edelsohn
  2001-04-21 10:11 ` Mark Mitchell
  0 siblings, 2 replies; 186+ messages in thread
From: John David Anglin @ 2001-04-20 21:29 UTC (permalink / raw)
  To: gcc, law

> A few of the remaining failures for PA32 using static libraries are
> multiply defined symbols -- in each case one or more symbols defined by
> the main program is a duplicate of a symbol in libstdc++.

The duplicate symbol problem also prevents building a shared libstdc++.,
particularly if you use a low optimization level for debugging.

I have been trying to track this for a couple of days.  The enclosed
patch may resolve the problem of duplicate symbols.  It appears to prevent
the symbols from being exported.  However, I have no idea whether it is
technically correct.  It is possible the problem should be fixed when
the original clone decl is created.

The functions are all constructors being instantiated from templates.
It is my assumption that these don't really need to be accessible from
other files and the duplication won't be a problem (ie., static data
should be in common).  On systems with weak support, they are weak
symbols.

The patch is not a complete solution.  There are still import assembler
statements being generated for these functions.  I have being trying to
figure out how DECL_EXTERNAL gets set but so far I can't find where it
is set.  I tried setting breaks on every place that cc1plus sets it
directly but this didn't work.  I am now running a test using `watch'
but this is incredibly slow.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2001-04-21  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* optimize.c (maybe_clone_body): Copy TREE_PUBLIC to clone.

--- optimize.c.orig	Wed Apr 11 15:05:20 2001
+++ optimize.c	Fri Apr 20 16:14:38 2001
@@ -1028,6 +1028,7 @@
       int parmno;
 
       /* Update CLONE's source position information to match FN's.  */
+      TREE_PUBLIC (clone) = TREE_PUBLIC (fn);
       DECL_SOURCE_FILE (clone) = DECL_SOURCE_FILE (fn);
       DECL_SOURCE_LINE (clone) = DECL_SOURCE_LINE (fn);
       DECL_INLINE (clone) = DECL_INLINE (fn);

^ permalink raw reply	[flat|nested] 186+ messages in thread
[parent not found: <20010421123809V.mitchell@codesourcery.com>]
* Re: C++ Issue on GCC 3.0 branch
@ 2001-04-28 10:43 John David Anglin
  0 siblings, 0 replies; 186+ messages in thread
From: John David Anglin @ 2001-04-28 10:43 UTC (permalink / raw)
  To: mark, gcc

Forwarded message:
From dave Sat Apr 28 13:36:47 EDT 2001
Subject: Re: C++ Issue on GCC 3.0 branch
To: law@redhat.com
Date: Sat, 28 Apr 2001 13:36:47 -0400 (EDT)
From: "John David Anglin" <dave@hiauly1>
In-Reply-To: < 6087.988477036@slagheap.cygnus.com > from "law@redhat.com" at Apr 28, 2001 09:57:16 am
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 3844      

>   In message < 200104272214.SAA06753@hiauly1.hia.nrc.ca >you write:
>   > I think we need to define builtin_setjmp_receiver to restore r19.  The
>   > default exception method I believe is exceptions via longjmp, so we need
>   > this.  However, I have no idea whether or not this will fix the problem
>   > with rethrow1.C.
> Yes, we probably need to restore %r19, but I'm 99.9 certain that's not the
> problem with the rethrow test since they fail with static libraries.
> 
> 
>   > I also noticed a while back that exception_receiver uses a stack offset
>   > of -32 to restore the pic offset table register.  This won't work on
>   > the 64-bit target.  I think we should restore from the
>   > PIC_OFFSET_TABLE_SAVE_RTX.  However, we need to wait for it to be
>   > initialized.

My test run with this revision is nearly complete.  The good news is
that the gcc results with and without "-fPIC" are now identical (39
FAILS under hppa1.1-hp-hpux10.20).

The bad news is that there have been a few g++ regressions (total of
19 FAILS in g++ testsuite with -fPIC).  I started looking at one of
them (cxa_vec.C) this morning.  I am afraid that there are still problems
with respect to r19.  In this particular case, I can see that the save
of r19 after various longjmp calls is being deleted in the jump pass.
The program has a segmentation call in the stub to call __start_cp_handler.
This is the calling code:

0x7ae94b20 <__cxa_vec_ctor+504>:        bl 0x7ae9489c <__sjthrow>,rp
0x7ae94b24 <__cxa_vec_ctor+508>:        stws r21,4(sr0,r20)
0x7ae94b28 <__cxa_vec_ctor+512>:        bl 0x7ae948d4 <__start_cp_handler>,rp
0x7ae94b2c <__cxa_vec_ctor+516>:        nop
0x7ae94b30 <__cxa_vec_ctor+520>:        ldw -f8(sr0,sp),r19

As you can see, r19 isn't being restored after the call to __sjthrow.
The program dies here:

(gdb) run
Program received signal SIGSEGV, Segmentation fault0x7ae948d8 in __start_cp_handler ()
    at ../../../../libstdc++-v3/libsupc++/vec.cc:130
(gdb) disass
0x7ae948d4 <__start_cp_handler>:        addil 9000,r19
0x7ae948d8 <__start_cp_handler+4>:      ldw -62c(sr0,r1),r21
(gdb) bt
#0  0x7ae948d8 in __start_cp_handler ()
    at ../../../../libstdc++-v3/libsupc++/vec.cc:130
#1  0x7ae94b30 in __cxa_vec_ctor (array_address=0x40004874, element_count=5,
    element_size=1, constructor=0x4000148a <DINFINITY+242>,
    destructor=0x40001482 <DINFINITY+234>)
    at ../../../../libstdc++-v3/libsupc++/vec.cc:149
nfo reg r1 r19
r1 4000a000
r19 40001000

Another slightly strange thing is that the longjmp calls are actual calls
to the library longjmp function.  On the otherhand, we are using the
builtin version for sjlj exceptions.  I wonder if it is a good idea to
be mixing the two.

I have looked at the placement of the pic offset table register save
in functions both with and without parameters.  This seems ok.  The above
problem seems to be a somewhat different problem although it still
involves the management of r19.  Should I install the current patch
or wait until there is a solution to the above issue?

2001-04-27  John David Anglin  <dave@hiauly1.hia.nrc.ca>

        * pa.c (hppa_init_pic_save): Update last_parm_insn after emitting
        pic save insn.

--- pa.c.orig	Tue Apr 17 14:36:50 2001
+++ pa.c	Fri Apr 27 14:11:02 2001
@@ -3359,7 +3359,8 @@
 
   /* Emit the insn at the beginning of the function after the prologue.  */
   push_topmost_sequence ();
-  emit_insn_after (insn, last_parm_insn ? last_parm_insn : get_insns ());
+  last_parm_insn =
+    emit_insn_after (insn, last_parm_insn ? last_parm_insn : get_insns ());
   pop_topmost_sequence ();
 }
 
It definitely is a major step forward even if it isn't the complete
solution.  

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

^ permalink raw reply	[flat|nested] 186+ messages in thread
* gcc-64 on HP-UX 11.00
@ 2002-04-04  2:03 H.Merijn Brand
  2002-04-04  8:22 ` law
       [not found] ` <200204041958.g34JwTbA011272@hiauly1.hia.nrc.ca>
  0 siblings, 2 replies; 186+ messages in thread
From: H.Merijn Brand @ 2002-04-04  2:03 UTC (permalink / raw)
  To: gcc

As I've seen on the gcc web site, HP-UX 11.00 has been promoted to primary
target site. I've got no trouble building gcc in 32 bit mode, but building a
64bit gcc is still almost impossible.

Is there a preferred way to build from the latest snapshot? Do you want more
specific messages about the problems?

I'm not into the gcc sources, but somehow I seem to be willing to function as
a compile farm.

I've got

	The latest HP-UX 11.00 with the latest patches
	The latest C compiler (B.11.11.04 HP C/ANSI C Compiler)
	Several ports of gcc
		3.0.4/32
		3.0.1/64
		3.0.2/64
	binutils-2.11.90/64
	binutils-2.12/64

-- 
H.Merijn Brand        Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.7.3 & 631 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
  WinNT 4, Win2K pro & WinCE 2.11.  Smoking perl CORE: smokers@perl.org
http://archives.develooper.com/daily-build@perl.org/   perl-qa@perl.org
send smoke reports to: smokers-reports@perl.org, QA: http://qa.perl.org

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

end of thread, other threads:[~2007-04-15 16:35 UTC | newest]

Thread overview: 186+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <no.id>
1997-09-30  8:09 ` Mini-patch for cccp.c Thomas Koenig
1997-09-30 23:24   ` Jeffrey A Law
1997-10-06  8:25   ` Thomas Koenig
1997-11-16 18:42 ` A new bug in 971114 H.J. Lu
1998-04-20 11:44 ` egcs 1.0.3 on linux/alpha H.J. Lu
1998-07-17 16:48 ` -Wall stops compiling of egcs-1.0.3 Joe Buck
1998-10-30 19:14 ` A bad EH bug H.J. Lu
     [not found] ` <19981218003619.B28066@cerebro.laendle>
     [not found]   ` <19981220010520.A4999@tantalophile.demon.co.uk>
     [not found]     ` <19981220223834.D16580@cerebro.laendle>
1998-12-21  2:53       ` GCC 2.7.2.3 good, EGCS 1.0.3 bad for x86 subtract then test Jamie Lokier
1998-12-23 14:19         ` Richard Henderson
1998-12-23 20:57           ` Jeffrey A Law
1998-12-24  1:11             ` Toshiyasu Morita
1998-12-25 18:17           ` Michael Hayes
1998-12-25 21:57             ` Jeffrey A Law
1998-12-26  2:07               ` Michael Hayes
1998-12-27  0:13                 ` Jeffrey A Law
1998-12-27  0:59                   ` Michael Hayes
2000-12-19 21:48 ` FWIW: VAX fix backport and gcc built on 4.3BSD first time ever! John David Anglin
2000-12-21 14:32   ` John David Anglin
2001-01-01 16:37 ` pa reload problem John David Anglin
2001-01-03 20:57   ` Jeffrey A Law
2001-01-03 22:08     ` John David Anglin
2001-01-04  9:55       ` Jeffrey A Law
2001-01-04 11:12         ` John David Anglin
2001-01-04 11:35         ` John David Anglin
2001-01-04 11:48           ` Alexandre Oliva
2001-01-04 13:06             ` John David Anglin
2001-01-04 13:18               ` Alexandre Oliva
2001-01-04 14:12                 ` John David Anglin
2001-01-12 19:40 ` RFC: Jump to const_int John David Anglin
2001-01-12 21:10   ` Fergus Henderson
2001-04-17 19:11 ` GCC 3.0 Status Report John David Anglin
2001-04-18  0:55   ` Mark Mitchell
2001-04-18  9:00     ` John David Anglin
2001-04-18 13:51     ` John David Anglin
2001-04-20 13:36       ` Mark Mitchell
2001-04-21 19:33 ` C++ Issue on GCC 3.0 branch John David Anglin
2001-04-23  2:18   ` Bernd Schmidt
2001-04-23  7:51     ` law
2001-04-23  7:55       ` Bernd Schmidt
2001-04-23  7:56       ` Bernd Schmidt
2001-04-23  8:14         ` law
2001-04-25 10:26   ` Mark Mitchell
2001-04-25 14:04     ` John David Anglin
2001-04-25 17:31       ` Mark Mitchell
2001-04-26  8:31         ` John David Anglin
2001-04-26 10:25           ` Mark Mitchell
2001-04-26 10:02         ` law
2001-04-23 15:21 ` John David Anglin
2001-04-24 19:21   ` law
2001-04-24 20:23     ` John David Anglin
2001-04-26 16:45       ` law
2001-04-26 17:02         ` Mark Mitchell
2001-04-26 17:29           ` law
2001-04-27 10:43         ` John David Anglin
2001-04-27 15:14         ` John David Anglin
2001-04-28  9:55           ` law
2001-04-30  8:59         ` John David Anglin
2001-05-16 16:22 ` gcc 2.95.2 Joe Buck
2001-06-14  9:58 ` STL warnings recently appeared in the 3.0 branch John David Anglin
2001-06-14 11:34 ` Possible corruption of gcc-3.0-20010614.tar.bz2 John David Anglin
2001-06-14 15:56 ` PATCH: Fix invalid loader fixups from shared libobjc with John David Anglin
2001-08-09 15:12 ` Simple returns are broken in gcc 3.X John David Anglin
2001-08-09 15:48   ` Richard Henderson
2001-12-12  8:49 ` Question regarding ICE in instantiate_virtual_regs_1, at function.c:3880 John David Anglin
2001-12-12 15:58   ` John David Anglin
2001-12-13  1:28     ` Jan Hubicka
2001-12-13 11:57       ` John David Anglin
2001-12-13 12:05         ` Jan Hubicka
2001-12-14 13:26           ` John David Anglin
2002-01-30 17:36 ` condition codes, haifa-sched and virtual-stack-vars Ulrich Weigand
2002-02-21 13:31 ` Help! DW function pointer encoding for PA John David Anglin
2002-02-21 19:28   ` David Edelsohn
2002-04-05 12:45 ` middle-end/6180: Infinite loop in cc1 during dbr pass John David Anglin
2002-04-05 13:54   ` Richard Henderson
2002-04-06 12:58     ` John David Anglin
2002-04-06 14:51       ` Richard Henderson
2002-04-10 15:30 ` gcc-64 on HP-UX 11.00 John David Anglin
2002-04-11 10:25 ` John David Anglin
2002-04-11 10:43   ` H.Merijn Brand
2002-04-11 11:04   ` law
2002-04-15 13:39 ` John David Anglin
2002-04-16 13:14   ` law
2002-04-16 15:25     ` John David Anglin
2002-11-13  3:37   ` gcc-64 20021111 broken " H.Merijn Brand
2002-11-13  5:38     ` H.Merijn Brand
2002-11-13  8:31       ` John David Anglin
2002-11-13 13:12       ` John David Anglin
2002-11-15  9:54         ` H.Merijn Brand
2002-11-13  8:30     ` John David Anglin
2002-04-26 10:43 ` bison 1.33 problem with mainline c-parse.in: yyfree_stacks John David Anglin
2002-05-11 20:28 ` corrections to recent profile-arcs change John David Anglin
2002-06-01 17:01 ` vax double precision broken Joe Buck
2002-07-11  6:34 ` Bootstrapping hppa64? CPP problem John David Anglin
2002-07-16 13:21 ` [parisc-linux] gcc-3.[02] alignment problem John David Anglin
2002-07-16 13:43   ` Randolph Chung
2002-07-16 13:45     ` Matthew Wilcox
2002-07-17  5:26       ` Randolph Chung
2002-07-16 14:26     ` Richard Henderson
2002-07-26 20:16 ` mainline bootstrap failure in bitmap.c on sparcv9-sun-solaris2.8 John David Anglin
2002-07-27 18:50   ` Richard Henderson
2002-07-28  4:50   ` Richard Henderson
2002-07-28 13:08     ` John David Anglin
2002-07-28 21:35     ` John David Anglin
2002-08-01 12:02 ` gcc 3.2's cpp breaks configure scripts John David Anglin
2002-10-08 16:26 ` soft-float support Graeme Peterson
2002-11-13 14:19 ` gcc-64 20021111 broken on HP-UX 11.00 John David Anglin
2002-11-23  0:26 ` HP-UX IA64 Patch to fix earlier patch John David Anglin
2002-12-17  9:52 ` Setting LD tool default to ld breaks configure check for ld used by GCC John David Anglin
2002-12-20 17:39   ` John David Anglin
2003-01-02 17:48 ` Miscompilation of glibc with CVS mainline John David Anglin
2003-01-02 17:54   ` Jakub Jelinek
2003-01-02 18:58     ` John David Anglin
2003-01-02 17:57   ` Daniel Jacobowitz
2003-02-03  5:02 ` hppa-linux regressions and 3.2.2 release John David Anglin
2003-02-03 11:03   ` Gabriel Dos Reis
2003-02-03 16:26   ` John David Anglin
2003-02-03 16:54     ` Gabriel Dos Reis
2003-02-03 18:02       ` John David Anglin
2003-02-11 19:37 ` Bootstrap failure on hppa-unknown-linux-gnu, trunk John David Anglin
2003-02-11 22:37   ` Josef Zlomek
2003-02-11 22:51     ` John David Anglin
2003-03-05 22:03   ` Josef Zlomek
2003-03-05 22:05     ` Josef Zlomek
2003-02-11 19:59 ` Altivec + 16 byte alignment John David Anglin
2003-02-11 21:02   ` Mike Stump
2003-02-12  5:55     ` Fergus Henderson
2003-02-12 16:39       ` John David Anglin
2003-05-07  1:13 ` GCC 3.3 Prelease broken on s390 Ulrich Weigand
2003-05-07  1:27   ` Richard Henderson
2003-05-07  5:53     ` Mark Mitchell
2003-05-07 14:54     ` Ulrich Weigand
2003-05-07 15:53       ` Mark Mitchell
2003-05-07 16:03         ` Joe Buck
2003-05-07 16:13           ` Mark Mitchell
2003-05-07 17:02         ` Ulrich Weigand
2003-05-07 17:09           ` Joe Buck
2003-05-07 17:11           ` Mark Mitchell
2003-05-07 19:39             ` Ulrich Weigand
2003-05-07 19:45               ` Mark Mitchell
2003-05-07 18:19           ` Jonathan Lennox
2003-05-07 18:27             ` Mark Mitchell
2003-05-07 18:30               ` Jonathan Lennox
2003-05-07 18:36                 ` Mark Mitchell
2003-05-07 18:49                 ` Daniel Jacobowitz
2003-05-07 17:51       ` Richard Henderson
2003-05-07 19:42         ` Ulrich Weigand
2003-05-07 19:46           ` Mark Mitchell
2003-07-05 17:01 ` Solaris 8/SPARC bootstrap broken building 64-bit libgcc John David Anglin
2003-10-08  3:11 ` Someone broke bootstrap John David Anglin
2003-10-08  7:25   ` Eric Christopher
2003-10-08 17:26     ` John David Anglin
2004-01-06  0:43 ` autoconf changes break bootstrap on hppa*-*-hpux* John David Anglin
2007-04-15 19:13 ` Call to arms: testsuite failures on various targets John David Anglin
2001-04-20  9:47 C++ Issue on GCC 3.0 branch Jeffrey A Law
2001-04-20 21:29 John David Anglin
2001-04-20 21:31 ` David Edelsohn
2001-04-21 10:11 ` Mark Mitchell
2001-04-22 14:54   ` John David Anglin
2001-04-22 16:22     ` Mark Mitchell
2001-04-22 17:18       ` John David Anglin
2001-04-23  8:03         ` law
2001-04-23  8:29           ` John David Anglin
2001-05-06  9:33             ` law
2001-05-06  9:59               ` John David Anglin
2001-04-23  7:59     ` law
2001-04-23  8:08       ` John David Anglin
2001-04-23  8:19         ` law
2001-04-23  8:45           ` John David Anglin
2001-04-23 10:39           ` John David Anglin
     [not found] <20010421123809V.mitchell@codesourcery.com>
2001-04-21 16:05 ` John David Anglin
2001-04-28 10:43 John David Anglin
2002-04-04  2:03 gcc-64 on HP-UX 11.00 H.Merijn Brand
2002-04-04  8:22 ` law
     [not found] ` <200204041958.g34JwTbA011272@hiauly1.hia.nrc.ca>
2002-04-05  4:51   ` H.Merijn Brand
2002-04-05  5:01     ` H.Merijn Brand
2002-04-05  9:19     ` John David Anglin
2002-04-07  7:26       ` H.Merijn Brand
2002-04-07 12:17         ` John David Anglin
2002-04-10  3:39       ` H.Merijn Brand
2002-04-10 11:21         ` John David Anglin
2002-04-10 11:56           ` H.Merijn Brand
2002-04-10 12:50             ` John David Anglin
2002-04-11  2:19               ` H.Merijn Brand
2002-04-11  8:59                 ` John David Anglin
2002-04-11  9:15                   ` H.Merijn Brand
2002-04-11  9:19                   ` law

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).