public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42357]  New: another ice in create_tmp_var
@ 2009-12-12 10:11 dcb314 at hotmail dot com
  2009-12-12 10:13 ` [Bug c++/42357] " dcb314 at hotmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2009-12-12 10:11 UTC (permalink / raw)
  To: gcc-bugs

I just tried to compile the package Twindy-1.01-0.pm.1.1 with the GNU
C compiler version 4.5 snapshot 20091210 and the compiler said

juce_amalgamated.cpp:55688:22: internal compiler error: in create_tmp_var, at
gimplify.c:504
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Preprocessed source code attached. Flag -O2 required.

I know this bug looks similar to #40938, but that was
fixed months ago.


-- 
           Summary: another ice in create_tmp_var
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: x86_64-suse-linux


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


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

* [Bug c++/42357] another ice in create_tmp_var
  2009-12-12 10:11 [Bug c++/42357] New: another ice in create_tmp_var dcb314 at hotmail dot com
@ 2009-12-12 10:13 ` dcb314 at hotmail dot com
  2009-12-13 15:20 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2009-12-12 10:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dcb314 at hotmail dot com  2009-12-12 10:12 -------
Created an attachment (id=19281)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19281&action=view)
gzipped C++ source code


-- 


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


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

* [Bug c++/42357] another ice in create_tmp_var
  2009-12-12 10:11 [Bug c++/42357] New: another ice in create_tmp_var dcb314 at hotmail dot com
  2009-12-12 10:13 ` [Bug c++/42357] " dcb314 at hotmail dot com
@ 2009-12-13 15:20 ` rguenth at gcc dot gnu dot org
  2009-12-13 16:04 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-12-13 15:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-12-13 15:19 -------
The type is addressable and we're creating the temporary on behalf of
early SRA through force_gimple_operand_gsi.

VIEW_CONVERT_EXPR<struct PixelARGB>(SR.9075)

it's not necessary to do this gimplification as the stmt is a struct copy
before:

2449          if (force_gimple_rhs)
2450            rhs = force_gimple_operand_gsi (gsi, rhs, true, NULL_TREE,
2451                                            true, GSI_SAME_STMT);
2452          if (gimple_assign_rhs1 (*stmt) != rhs)
2453            {
2454              gimple_assign_set_rhs_from_tree (gsi, rhs);
(gdb) call debug_gimple_stmt (*stmt)
# .MEM_199 = VDEF <.MEM_91>
pixel.argb = D.93455.argb;

in fact, why the following looks wrong:

          if (!useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (rhs)))
            {
              rhs = fold_build1_loc (loc, VIEW_CONVERT_EXPR, TREE_TYPE (lhs),
rhs);
              if (!is_gimple_reg (lhs))
                force_gimple_rhs = true;

it should check for is_gimple_reg_type (TREE_TYPE (lhs)) instead.

I'm reducing the testcase and check a patch to that effect.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-12-13 15:19:50
               date|                            |


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


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

* [Bug c++/42357] another ice in create_tmp_var
  2009-12-12 10:11 [Bug c++/42357] New: another ice in create_tmp_var dcb314 at hotmail dot com
  2009-12-12 10:13 ` [Bug c++/42357] " dcb314 at hotmail dot com
  2009-12-13 15:20 ` rguenth at gcc dot gnu dot org
@ 2009-12-13 16:04 ` rguenth at gcc dot gnu dot org
  2009-12-13 17:36 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-12-13 16:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2009-12-13 16:04 -------
typedef unsigned char uint8;
typedef unsigned int uint32;
class PixelARGB {
public:
    ~PixelARGB() throw() { }
    PixelARGB (const uint32 argb_) throw() : argb (argb_)     { }
    inline __attribute__((always_inline)) uint8 getRed() const throw() {
        return components.r;
    }
    union     {
        uint32 argb;
        struct         {
            uint8 b, g, r, a;
        } components;
    };
};
class Colour {
public:
    Colour() throw() : argb (0) {};
    uint8 getRed() const throw() {
        return argb.getRed();
    }
    PixelARGB argb;
};
uint8 writeImage (void) {
    Colour pixel;
    pixel = Colour ();
    return pixel.getRed();
}


-- 


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


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

* [Bug c++/42357] another ice in create_tmp_var
  2009-12-12 10:11 [Bug c++/42357] New: another ice in create_tmp_var dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2009-12-13 16:04 ` rguenth at gcc dot gnu dot org
@ 2009-12-13 17:36 ` rguenth at gcc dot gnu dot org
  2009-12-13 17:37 ` [Bug tree-optimization/42357] [4.5 Regression] " rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-12-13 17:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2009-12-13 17:36 -------
Subject: Bug 42357

Author: rguenth
Date: Sun Dec 13 17:36:20 2009
New Revision: 155193

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155193
Log:
2009-12-13  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/42357
        * tree-sra.c (sra_modify_assign): Do not tear apart struct copies.

        * g++.dg/torture/pr42357.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr42357.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-sra.c


-- 


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


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

* [Bug tree-optimization/42357] [4.5 Regression] another ice in create_tmp_var
  2009-12-12 10:11 [Bug c++/42357] New: another ice in create_tmp_var dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2009-12-13 17:36 ` rguenth at gcc dot gnu dot org
@ 2009-12-13 17:37 ` rguenth at gcc dot gnu dot org
  2009-12-13 21:57 ` matz at gcc dot gnu dot org
  2009-12-22 18:18 ` hjl at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-12-13 17:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2009-12-13 17:36 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |tree-optimization
           Keywords|                            |ice-on-valid-code
      Known to work|                            |4.4.2
            Summary|another ice in              |[4.5 Regression] another ice
                   |create_tmp_var              |in create_tmp_var
   Target Milestone|---                         |4.5.0


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


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

* [Bug tree-optimization/42357] [4.5 Regression] another ice in create_tmp_var
  2009-12-12 10:11 [Bug c++/42357] New: another ice in create_tmp_var dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2009-12-13 17:37 ` [Bug tree-optimization/42357] [4.5 Regression] " rguenth at gcc dot gnu dot org
@ 2009-12-13 21:57 ` matz at gcc dot gnu dot org
  2009-12-22 18:18 ` hjl at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: matz at gcc dot gnu dot org @ 2009-12-13 21:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from matz at gcc dot gnu dot org  2009-12-13 21:57 -------
Mark it so.


-- 

matz at gcc dot gnu dot org changed:

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


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


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

* [Bug tree-optimization/42357] [4.5 Regression] another ice in create_tmp_var
  2009-12-12 10:11 [Bug c++/42357] New: another ice in create_tmp_var dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2009-12-13 21:57 ` matz at gcc dot gnu dot org
@ 2009-12-22 18:18 ` hjl at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-12-22 18:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from hjl at gcc dot gnu dot org  2009-12-22 18:18 -------
Subject: Bug 42357

Author: hjl
Date: Tue Dec 22 18:17:53 2009
New Revision: 155403

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155403
Log:
Backport testcases from mainline.

2009-12-22  H.J. Lu  <hongjiu.lu@intel.com>

        Backport from mainline:
        2009-12-19  Dodji Seketeli  <dodji@redhat.com>

        PR c++/42225
        * g++.dg/template/typedef26.C: New test.

        2009-12-17  Jakub Jelinek  <jakub@redhat.com>

        PR c++/42386
        * g++.dg/opt/dtor3.C: New test.

        2009-12-15  Jason Merrill  <jason@redhat.com>

        PR c++/42358
        * g++.dg/cpp0x/variadic98.C: New.

        2009-12-13  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/42357
        * g++.dg/torture/pr42357.C: New testcase.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/cpp0x/variadic98.C
      - copied unchanged from r155402,
trunk/gcc/testsuite/g++.dg/cpp0x/variadic98.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/opt/dtor3.C
      - copied unchanged from r155402, trunk/gcc/testsuite/g++.dg/opt/dtor3.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/typedef26.C
      - copied unchanged from r155402,
trunk/gcc/testsuite/g++.dg/template/typedef26.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr42357.C
      - copied unchanged from r155402,
trunk/gcc/testsuite/g++.dg/torture/pr42357.C
Modified:
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2009-12-22 18:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-12 10:11 [Bug c++/42357] New: another ice in create_tmp_var dcb314 at hotmail dot com
2009-12-12 10:13 ` [Bug c++/42357] " dcb314 at hotmail dot com
2009-12-13 15:20 ` rguenth at gcc dot gnu dot org
2009-12-13 16:04 ` rguenth at gcc dot gnu dot org
2009-12-13 17:36 ` rguenth at gcc dot gnu dot org
2009-12-13 17:37 ` [Bug tree-optimization/42357] [4.5 Regression] " rguenth at gcc dot gnu dot org
2009-12-13 21:57 ` matz at gcc dot gnu dot org
2009-12-22 18:18 ` hjl 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).