public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kenneth Zadeck <zadeck@naturalbridge.com>
To: Jim Blandy <jimb@codesourcery.com>,
	  Mark Mitchell <mark@codesourcery.com>,
	 gcc-patches <gcc-patches@gcc.gnu.org>,
	  William Maddox <maddox@google.com>
Subject: [lto] patch committed to fix calls and FUNCTION_DECLS
Date: Tue, 28 Aug 2007 17:02:00 -0000	[thread overview]
Message-ID: <46D4525E.9060209@naturalbridge.com> (raw)

Bill Maddox sent me the following test case:

=============
unsigned fact(unsigned x)
{
  if (x == 0)
    return 1;
  else
    return x * fact(x - 1);
}

int
main()
{
  (void)fact(5);  /* dont' bother to print */
  return 0;
}
=============
Which i have processed with the following two commands:
=============
./xgcc -flto -c -O2 test/test.c -o test/test.o
./lto1 -O2 test/test.o -o test/test.o.o
=============
This patch fixes the first two problems that you would hit if you tried
this set of commands.
I am working on the third.

kenny



2007-08-28  Kenneth Zadeck <zadeck@naturalbridge.com>

    * lto-function-out (output_expr_operand): Reorder the fields
    in the stream for CALL_EXPRs.
    (lto_static_init): Do not put out types for FUNCTION_DECLs.

             reply	other threads:[~2007-08-28 16:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-28 17:02 Kenneth Zadeck [this message]
2007-08-28 17:05 ` Diego Novillo
2007-08-28 17:45   ` Kenneth Zadeck

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=46D4525E.9060209@naturalbridge.com \
    --to=zadeck@naturalbridge.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jimb@codesourcery.com \
    --cc=maddox@google.com \
    --cc=mark@codesourcery.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).