public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/26141]  New: va_arg causes cc1plus ICE in gimplify_addr_expr
@ 2006-02-07  0:04 kkojima at gcc dot gnu dot org
  2006-02-07  0:08 ` [Bug target/26141] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2006-02-07  0:04 UTC (permalink / raw)
  To: gcc-bugs

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


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

* [Bug target/26141] [4.1/4.2 Regression] va_arg causes cc1plus ICE in gimplify_addr_expr
  2006-02-07  0:04 [Bug target/26141] New: va_arg causes cc1plus ICE in gimplify_addr_expr kkojima at gcc dot gnu dot org
@ 2006-02-07  0:08 ` pinskia at gcc dot gnu dot org
  2006-02-08 19:05 ` amylaar at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-07  0:08 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org
           Severity|normal                      |critical
  GCC build triplet|i686-pc-linux-gnu           |
   GCC host triplet|i686-pc-linux-gnu           |
            Summary|va_arg causes cc1plus ICE in|[4.1/4.2 Regression] va_arg
                   |gimplify_addr_expr          |causes cc1plus ICE in
                   |                            |gimplify_addr_expr
   Target Milestone|---                         |4.1.0


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


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

* [Bug target/26141] [4.1/4.2 Regression] va_arg causes cc1plus ICE in gimplify_addr_expr
  2006-02-07  0:04 [Bug target/26141] New: va_arg causes cc1plus ICE in gimplify_addr_expr kkojima at gcc dot gnu dot org
  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
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-02-08 19:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from amylaar at gcc dot gnu dot org  2006-02-08 19:05 -------
Confirmed for revision 110699


-- 

amylaar at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-02-08 19:05:43
               date|                            |


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


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

* [Bug target/26141] [4.1/4.2 Regression] va_arg causes cc1plus ICE in gimplify_addr_expr
  2006-02-07  0:04 [Bug target/26141] New: va_arg causes cc1plus ICE in gimplify_addr_expr kkojima at gcc dot gnu dot org
  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
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-02-09 20:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from amylaar at gcc dot gnu dot org  2006-02-09 20:26 -------
I got a patch... now where to put the testcase...


-- 

amylaar at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |amylaar at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-02-08 19:05:43         |2006-02-09 20:26:12
               date|                            |


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


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

* [Bug target/26141] [4.1/4.2 Regression] va_arg causes cc1plus ICE in gimplify_addr_expr
  2006-02-07  0:04 [Bug target/26141] New: va_arg causes cc1plus ICE in gimplify_addr_expr kkojima at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-02-09 20:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from amylaar at gcc dot gnu dot org  2006-02-09 20:54 -------
Subject: Bug 26141

Author: amylaar
Date: Thu Feb  9 20:54:12 2006
New Revision: 110811

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110811
Log:
PR target/26141

gcc:
        * sh.c (sh_gimplify_va_arg_expr): Don't change the result type when
        computing the effective result type.

gcc/testsuite:
        * g++.dg/expr/stdarg2.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/expr/stdarg2.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/sh/sh.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug target/26141] [4.1 Regression] va_arg causes cc1plus ICE in gimplify_addr_expr
  2006-02-07  0:04 [Bug target/26141] New: va_arg causes cc1plus ICE in gimplify_addr_expr kkojima at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-02-09 20:54 ` amylaar at gcc dot gnu dot org
@ 2006-02-09 21:07 ` pinskia at gcc dot gnu dot org
  2006-02-09 21:45 ` amylaar at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-09 21:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-02-09 21:07 -------
Fixed at least on the mainline.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1/4.2 Regression] va_arg |[4.1 Regression] va_arg
                   |causes cc1plus ICE in       |causes cc1plus ICE in
                   |gimplify_addr_expr          |gimplify_addr_expr


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


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

* [Bug target/26141] [4.1 Regression] va_arg causes cc1plus ICE in gimplify_addr_expr
  2006-02-07  0:04 [Bug target/26141] New: va_arg causes cc1plus ICE in gimplify_addr_expr kkojima at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-02-09 21:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from amylaar at gcc dot gnu dot org  2006-02-09 21:45 -------
(In reply to comment #3)

I am currently regtesting the backported patch (merged cleanly except for
ChangeLogs) in the 4.1 branch for sh-elf and sh64-elf.


-- 


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


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

* [Bug target/26141] [4.1 Regression] va_arg causes cc1plus ICE in gimplify_addr_expr
  2006-02-07  0:04 [Bug target/26141] New: va_arg causes cc1plus ICE in gimplify_addr_expr kkojima at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  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
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-02-14  9:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mmitchel at gcc dot gnu dot org  2006-02-14 09:01 -------
SH is not a primary platform, so this is P5.  However, it's fine (good, in
fact!) to put the patch on the branch if the testing succeeds.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P5


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


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

* [Bug target/26141] [4.1 Regression] va_arg causes cc1plus ICE in gimplify_addr_expr
  2006-02-07  0:04 [Bug target/26141] New: va_arg causes cc1plus ICE in gimplify_addr_expr kkojima at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  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
  8 siblings, 0 replies; 10+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-02-14 14:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from amylaar at gcc dot gnu dot org  2006-02-14 14:46 -------
Subject: Bug 26141

Author: amylaar
Date: Tue Feb 14 14:46:33 2006
New Revision: 110971

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110971
Log:
PR target/26141

gcc:
        * sh.c (sh_gimplify_va_arg_expr): Don't change the result type when
        computing the effective result type.

gcc/testsuite:
        * g++.dg/expr/stdarg2.C: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/expr/stdarg2.C
      - copied unchanged from r110811,
trunk/gcc/testsuite/g++.dg/expr/stdarg2.C
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/config/sh/sh.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug target/26141] [4.1 Regression] va_arg causes cc1plus ICE in gimplify_addr_expr
  2006-02-07  0:04 [Bug target/26141] New: va_arg causes cc1plus ICE in gimplify_addr_expr kkojima at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-02-14 14:46 ` amylaar at gcc dot gnu dot org
@ 2006-02-14 14:48 ` amylaar at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-02-14 14:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from amylaar at gcc dot gnu dot org  2006-02-14 14:48 -------
(In reply to comment #7)
Fixed.


-- 

amylaar at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2006-02-14 14:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-07  0:04 [Bug target/26141] New: va_arg causes cc1plus ICE in gimplify_addr_expr kkojima at gcc dot gnu dot org
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

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