public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kkojima at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/26141]  New: va_arg causes cc1plus ICE in gimplify_addr_expr
Date: Tue, 07 Feb 2006 00:04:00 -0000	[thread overview]
Message-ID: <bug-26141-5208@http.gcc.gnu.org/bugzilla/> (raw)

4.1 cc1plus compiler on sh4-linux fails with the ICE

foo.cc:11: internal compiler error: in gimplify_addr_expr, at gimplify.c:3572

for

struct S
{
  double a;
};

void
foo (int z, ...)
{
  struct S arg;
  __builtin_va_list ap;
  arg = __builtin_va_arg (ap, struct S);
}

and 4.2 cc1plus fails with the similar message.  sh-elf cc1plus
also fails with -m4.
Binary search shows that it starts to fail just after the patch

r110565 | jason | 2006-02-04 06:57:08 +0900 (Sat, 04 Feb 2006) | 7 lines

        PR c++/25979
        * gimplify.c (gimplify_modify_expr_rhs): Disable *& optimization for
now.

        PR middle-end/25977
        * gimplify.c (gimplify_modify_expr_rhs): It's not always safe to do RVO
        on the return slot if it's an NRV.

and the ICE goes away if the first hunk of the patch is reverted.
It seems that the tree made by sh_gimplify_va_arg_expr depends on
that *& optimization which is now disabled.


-- 
           Summary: va_arg causes cc1plus ICE in gimplify_addr_expr
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kkojima at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: sh4-*-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26141


             reply	other threads:[~2006-02-07  0:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-07  0:04 kkojima at gcc dot gnu dot org [this message]
2006-02-07  0:08 ` [Bug target/26141] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-02-08 19:05 ` amylaar at gcc dot gnu dot org
2006-02-09 20:26 ` amylaar at gcc dot gnu dot org
2006-02-09 20:54 ` amylaar at gcc dot gnu dot org
2006-02-09 21:07 ` [Bug target/26141] [4.1 " pinskia at gcc dot gnu dot org
2006-02-09 21:45 ` amylaar at gcc dot gnu dot org
2006-02-14  9:01 ` mmitchel at gcc dot gnu dot org
2006-02-14 14:46 ` amylaar at gcc dot gnu dot org
2006-02-14 14:48 ` amylaar at gcc dot gnu dot org

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=bug-26141-5208@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).