public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/30168]  New: C++ constructors can cause invalid gimple to happen with complex typed variables
@ 2006-12-12  8:38 pinskia at gcc dot gnu dot org
  2006-12-12  8:39 ` [Bug c++/30168] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-12  8:38 UTC (permalink / raw)
  To: gcc-bugs

Testcase:
struct aaa
{
      aaa(_Complex float __z) ;
      _Complex float _M_value;
};
aaa::aaa(_Complex float __z) : _M_value(__z) {}
--------
We must not be setting DECL_COMPLEX_GIMPLE_REG_P correctly.


-- 
           Summary: C++ constructors can cause invalid gimple to happen with
                    complex typed variables
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
OtherBugsDependingO 30142
             nThis:


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


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

* [Bug c++/30168] C++ constructors can cause invalid gimple to happen with complex typed variables
  2006-12-12  8:38 [Bug c++/30168] New: C++ constructors can cause invalid gimple to happen with complex typed variables pinskia at gcc dot gnu dot org
@ 2006-12-12  8:39 ` pinskia at gcc dot gnu dot org
  2006-12-13  4:40 ` [Bug c++/30168] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-12  8:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-12-12 08:39 -------
This testcase comes from a reduced testcase from:
26_numerics/complex/13450.cc
26_numerics/complex/pow.cc
tr1/8_c_compatibility/complex/functions.cc
And most likely more.


-- 


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


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

* [Bug c++/30168] [4.1/4.2/4.3 Regression] C++ constructors can cause invalid gimple to happen with complex typed variables
  2006-12-12  8:38 [Bug c++/30168] New: C++ constructors can cause invalid gimple to happen with complex typed variables pinskia at gcc dot gnu dot org
  2006-12-12  8:39 ` [Bug c++/30168] " pinskia at gcc dot gnu dot org
@ 2006-12-13  4:40 ` pinskia at gcc dot gnu dot org
  2006-12-15 19:31 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-13  4:40 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1986 bytes --]



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-12-13 04:40 -------
And here is a testcase which makes this a regression:
struct aaa
{
      aaa(_Complex float __z) ;
      _Complex float _M_value;
};
aaa::aaa(_Complex float __z)
{
  __z*=2.0f;
  _M_value = __z;
}
---------------------
The invalid gimple causes an ICE:
[pinskia@celery ~]$ ~/gcc-4.1//bin/gcc -O2 t.cc -fdump-tree-all
t.cc: In constructor ‘aaa::aaa(float __complex__)’:
t.cc:6: internal compiler error: in find_lattice_value, at tree-complex.c:133
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
[pinskia@celery ~]$ ~/gcc-4.2//bin/gcc -O2 t.cc -fdump-tree-all
t.cc: In constructor ‘aaa::aaa(float __complex__)’:
t.cc:6: internal compiler error: in find_lattice_value, at tree-complex.c:133
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.1.0 4.2.0
      Known to work|                            |4.0.4
   Last reconfirmed|0000-00-00 00:00:00         |2006-12-13 04:40:26
               date|                            |
            Summary|C++ constructors can cause  |[4.1/4.2/4.3 Regression] C++
                   |invalid gimple to happen    |constructors can cause
                   |with complex typed variables|invalid gimple to happen
                   |                            |with complex typed variables
   Target Milestone|---                         |4.1.2


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


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

* [Bug c++/30168] [4.1/4.2/4.3 Regression] C++ constructors can cause invalid gimple to happen with complex typed variables
  2006-12-12  8:38 [Bug c++/30168] New: C++ constructors can cause invalid gimple to happen with complex typed variables pinskia at gcc dot gnu dot org
  2006-12-12  8:39 ` [Bug c++/30168] " pinskia at gcc dot gnu dot org
  2006-12-13  4:40 ` [Bug c++/30168] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2006-12-15 19:31 ` pinskia at gcc dot gnu dot org
  2006-12-15 21:47 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-15 19:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-12-15 19:31 -------
Mine, here is the patch which I am testing:
Index: optimize.c
===================================================================
--- optimize.c  (revision 119894)
+++ optimize.c  (working copy)
@@ -69,6 +69,8 @@ update_cloned_parm (tree parm, tree clon
   DECL_NAME (cloned_parm) = DECL_NAME (parm);
   DECL_SOURCE_LOCATION (cloned_parm) = DECL_SOURCE_LOCATION (parm);
   TREE_TYPE (cloned_parm) = TREE_TYPE (parm);
+
+  DECL_GIMPLE_REG_P (cloned_parm) = DECL_GIMPLE_REG_P (parm);
 }

 /* FN is a function that has a complete body.  Clone the body as


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/30168] [4.1/4.2/4.3 Regression] C++ constructors can cause invalid gimple to happen with complex typed variables
  2006-12-12  8:38 [Bug c++/30168] New: C++ constructors can cause invalid gimple to happen with complex typed variables pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-12-15 19:31 ` pinskia at gcc dot gnu dot org
@ 2006-12-15 21:47 ` pinskia at gcc dot gnu dot org
  2006-12-22  7:31 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-15 21:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-12-15 21:47 -------
(In reply to comment #3)
> Mine, here is the patch which I am testing:

My machine at work is over heating because the A/C is down so I won't be able
to test it until tonight at the earliest.


-- 


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


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

* [Bug c++/30168] [4.1/4.2/4.3 Regression] C++ constructors can cause invalid gimple to happen with complex typed variables
  2006-12-12  8:38 [Bug c++/30168] New: C++ constructors can cause invalid gimple to happen with complex typed variables pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-12-15 21:47 ` pinskia at gcc dot gnu dot org
@ 2006-12-22  7:31 ` pinskia at gcc dot gnu dot org
  2007-02-05  5:42 ` [Bug c++/30168] [4.1/4.2 " mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-22  7:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-12-22 07:31 -------
Subject: Bug 30168

Author: pinskia
Date: Fri Dec 22 07:30:55 2006
New Revision: 120144

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120144
Log:
2006-12-21  Andrew Pinski  <pinskia@gmail.com>

        PR C++/30168
        * optimize.c (update_cloned_parm): Copy DECL_GIMPLE_REG_P also.

2006-12-21  Andrew Pinski  <pinskia@gmail.com>

        PR C++/30168
        * g++.dg/opt/complex6.C: New test.



Added:
    trunk/gcc/testsuite/g++.dg/opt/complex6.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/optimize.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/30168] [4.1/4.2 Regression] C++ constructors can cause invalid gimple to happen with complex typed variables
  2006-12-12  8:38 [Bug c++/30168] New: C++ constructors can cause invalid gimple to happen with complex typed variables pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-12-22  7:31 ` pinskia at gcc dot gnu dot org
@ 2007-02-05  5:42 ` mmitchel at gcc dot gnu dot org
  2007-02-14  9:02 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-05  5:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mmitchel at gcc dot gnu dot org  2007-02-05 05:42 -------
This patch is OK for 4.2, and for 4.1 when reopened.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug c++/30168] [4.1/4.2 Regression] C++ constructors can cause invalid gimple to happen with complex typed variables
  2006-12-12  8:38 [Bug c++/30168] New: C++ constructors can cause invalid gimple to happen with complex typed variables pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2007-02-05  5:42 ` [Bug c++/30168] [4.1/4.2 " mmitchel at gcc dot gnu dot org
@ 2007-02-14  9:02 ` mmitchel at gcc dot gnu dot org
  2007-03-09 23:02 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14  9:02 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.2                       |4.1.3


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


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

* [Bug c++/30168] [4.1/4.2 Regression] C++ constructors can cause invalid gimple to happen with complex typed variables
  2006-12-12  8:38 [Bug c++/30168] New: C++ constructors can cause invalid gimple to happen with complex typed variables pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2007-02-14  9:02 ` mmitchel at gcc dot gnu dot org
@ 2007-03-09 23:02 ` pinskia at gcc dot gnu dot org
  2007-04-09 16:20 ` [Bug c++/30168] [4.1 " reichelt at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-03-09 23:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2007-03-09 23:02 -------
Subject: Bug 30168

Author: pinskia
Date: Fri Mar  9 23:02:28 2007
New Revision: 122766

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122766
Log:
2007-03-08  Andrew Pinski  <pinskia@gmail.com>

        PR C++/30168
        * optimize.c (update_cloned_parm): Copy DECL_COMPLEX_GIMPLE_REG_P also.

2007-03-09  Andrew Pinski  <pinskia@gmail.com>

        PR C++/30168
        * g++.dg/opt/complex6.C: New test.


Added:
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/opt/complex6.C
      - copied unchanged from r120144,
trunk/gcc/testsuite/g++.dg/opt/complex6.C
Modified:
    branches/gcc-4_2-branch/gcc/cp/ChangeLog
    branches/gcc-4_2-branch/gcc/cp/optimize.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/30168] [4.1 Regression] C++ constructors can cause invalid gimple to happen with complex typed variables
  2006-12-12  8:38 [Bug c++/30168] New: C++ constructors can cause invalid gimple to happen with complex typed variables pinskia at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2007-03-09 23:02 ` pinskia at gcc dot gnu dot org
@ 2007-04-09 16:20 ` reichelt at gcc dot gnu dot org
  2007-04-10  2:43 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-04-09 16:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from reichelt at gcc dot gnu dot org  2007-04-09 17:19 -------
Andrew, are you going to apply the patch to the 4.1 branch, too?


-- 


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


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

* [Bug c++/30168] [4.1 Regression] C++ constructors can cause invalid gimple to happen with complex typed variables
  2006-12-12  8:38 [Bug c++/30168] New: C++ constructors can cause invalid gimple to happen with complex typed variables pinskia at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2007-04-09 16:20 ` [Bug c++/30168] [4.1 " reichelt at gcc dot gnu dot org
@ 2007-04-10  2:43 ` pinskia at gcc dot gnu dot org
  2007-04-15  1:24 ` pinskia at gcc dot gnu dot org
  2007-04-15  1:24 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-10  2:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pinskia at gcc dot gnu dot org  2007-04-10 03:43 -------
> Andrew, are you going to apply the patch to the 4.1 branch, too?

When I get around to testing it, it wil not be until Thursday at the earliest.


-- 


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


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

* [Bug c++/30168] [4.1 Regression] C++ constructors can cause invalid gimple to happen with complex typed variables
  2006-12-12  8:38 [Bug c++/30168] New: C++ constructors can cause invalid gimple to happen with complex typed variables pinskia at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2007-04-15  1:24 ` pinskia at gcc dot gnu dot org
@ 2007-04-15  1:24 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-15  1:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pinskia at gcc dot gnu dot org  2007-04-15 02:24 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/30168] [4.1 Regression] C++ constructors can cause invalid gimple to happen with complex typed variables
  2006-12-12  8:38 [Bug c++/30168] New: C++ constructors can cause invalid gimple to happen with complex typed variables pinskia at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2007-04-10  2:43 ` pinskia at gcc dot gnu dot org
@ 2007-04-15  1:24 ` pinskia at gcc dot gnu dot org
  2007-04-15  1:24 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-15  1:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2007-04-15 02:24 -------
Subject: Bug 30168

Author: pinskia
Date: Sun Apr 15 02:24:00 2007
New Revision: 123839

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123839
Log:
2007-04-14  Andrew Pinski  <pinskia@gmail.com>

        PR C++/30168
        * optimize.c (update_cloned_parm): Copy DECL_COMPLEX_GIMPLE_REG_P also.

2007-04-14  Andrew Pinski  <pinskia@gmail.com>

        PR C++/30168
        * g++.dg/opt/complex6.C: New test.



Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/opt/complex6.C
      - copied unchanged from r122766,
branches/gcc-4_2-branch/gcc/testsuite/g++.dg/opt/complex6.C
Modified:
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/optimize.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2007-04-15  1:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-12  8:38 [Bug c++/30168] New: C++ constructors can cause invalid gimple to happen with complex typed variables pinskia at gcc dot gnu dot org
2006-12-12  8:39 ` [Bug c++/30168] " pinskia at gcc dot gnu dot org
2006-12-13  4:40 ` [Bug c++/30168] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
2006-12-15 19:31 ` pinskia at gcc dot gnu dot org
2006-12-15 21:47 ` pinskia at gcc dot gnu dot org
2006-12-22  7:31 ` pinskia at gcc dot gnu dot org
2007-02-05  5:42 ` [Bug c++/30168] [4.1/4.2 " mmitchel at gcc dot gnu dot org
2007-02-14  9:02 ` mmitchel at gcc dot gnu dot org
2007-03-09 23:02 ` pinskia at gcc dot gnu dot org
2007-04-09 16:20 ` [Bug c++/30168] [4.1 " reichelt at gcc dot gnu dot org
2007-04-10  2:43 ` pinskia at gcc dot gnu dot org
2007-04-15  1:24 ` pinskia at gcc dot gnu dot org
2007-04-15  1:24 ` pinskia 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).