public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Robert Lipe <robertl@dgii.com>
To: law@cygnus.com
Cc: egcs@cygnus.com
Subject: Re: disturbing g++ 971031 results. defer-pop to blame?
Date: Sun, 02 Nov 1997 23:32:00 -0000	[thread overview]
Message-ID: <19971103000221.16739@dgii.com> (raw)
In-Reply-To: <16196.878533936@hurl.cygnus.com>

> Real strange since I've actually looked in the log files when I've
> done H8 testing and everything seems to be in order...  Got to
> be something simple/stupid we're missing.

Probably.   I'll investigate that next.

>   > Now is when I notice that GDB is not playing nice with EGCS ELF output.
>   > When it rains...
> Sigh.  More likely it's not playing nice with dwarf2 more so than
> ELF.

Yes, and '-gdwarf1' results in unresolved externals.   Sigh.   I'm 
investigating that right now.

Let's focus on this problem right now:

>   > >   > If I add '-defer-pop' to most of the cases I've tried by hand, it
>   > >   > seems to work.   In  fact, I just wrote a script to loop through thos
>   > I meant "-fdefer-pop".   -fno-defer-pop (the default) still shows the 
>   > problem.
> Hmmm, -fdefer-pop is the default; the compiler will arrange for
> -fno-defer-pop to be on inside EH regions and such.  Real strange.

Actually, it's only the default if we're optimizing, right?  That's
what I'm led to believe from 'gcc -S' output.   That's actually
consistent with some more tests that I just ran.

Perhaps we need to make the c++ tests run with varying -O levels
as we do for the gcc tests.  After all, what's another few hours
during the build? :-)

Here's what I'm seeing.   negcs is just a script that calls the native
egcs:

G=/play/negcs
L=${G}/libraries
exec ${G}/gcc/xgcc -B${G}/gcc/ \
        -I${L}/libio/ \
        -I${L}/libstdc++/ \
        "$@"

$ ./negcs /tmp/net34.C -lstdc++ && ./a.out
bar_1::k -> 1
bar_2::k -> 2
bar_1::get_k() -> 1
bar_2::get_k() -> 2
Memory fault(coredump)
(robertl) rjlhome:/play/testgcc
$ ./negcs -O0 /tmp/net34.C -lstdc++ && ./a.out
bar_1::k -> 1
bar_2::k -> 2
bar_1::get_k() -> 1
bar_2::get_k() -> 2
Memory fault(coredump)
(robertl) rjlhome:/play/testgcc
$ ./negcs -O1 /tmp/net34.C -lstdc++ && ./a.out
bar_1::k -> 1
bar_2::k -> 2
bar_1::get_k() -> 1
bar_2::get_k() -> 2
(robertl) rjlhome:/play/testgcc
$ ./negcs -O2 /tmp/net34.C -lstdc++ && ./a.out
bar_1::k -> 1
bar_2::k -> 2
bar_1::get_k() -> 1
bar_2::get_k() -> 2
(robertl) rjlhome:/play/testgcc
$ ./negcs -O3 /tmp/net34.C -lstdc++ && ./a.out
bar_1::k -> 1
bar_2::k -> 2
bar_1::get_k() -> 1
bar_2::get_k() -> 2
$

Perhaps something is doing something bad on the stack and defer-pop
is just circumventing it.

RJL

  reply	other threads:[~1997-11-02 23:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-01 20:49 GCC 971031 on OpenServer Robert Lipe
1997-11-02 12:48 ` disturbing g++ 971031 results. defer-pop to blame? Robert Lipe
1997-11-02 19:06   ` Jeffrey A Law
1997-11-02 20:47     ` Robert Lipe
1997-11-02 22:44       ` Jeffrey A Law
1997-11-02 23:32         ` Robert Lipe [this message]
1997-11-03  2:06           ` Jeffrey A Law
1997-11-03  2:06         ` Robert Lipe
1997-11-03  1:51           ` Jeffrey A Law
1997-11-03  3:21             ` Andreas Schwab
1997-11-03  9:43             ` Robert Lipe
     [not found]           ` <16810.878541954.cygnus.egcs@hurl.cygnus.com>
1997-11-03  2:28             ` Jason Merrill
1997-11-03  9:43           ` disturbing g++ 971031 results. defer-pop not to blame Robert Lipe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19971103000221.16739@dgii.com \
    --to=robertl@dgii.com \
    --cc=egcs@cygnus.com \
    --cc=law@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).