public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51150] New: [C++11][4.6 Regression] ICE when result of -> initializes const variable of different type
@ 2011-11-16  5:31 jyasskin at gcc dot gnu.org
  2011-11-16  5:37 ` [Bug c++/51150] [C++11][4.6/4.7 " jyasskin at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jyasskin at gcc dot gnu.org @ 2011-11-16  5:31 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51150
           Summary: [C++11][4.6 Regression] ICE when result of ->
                    initializes const variable of different type
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jyasskin@gcc.gnu.org


Using gcc-4_6-branch@181398, the following program ICEs:


$ cat test.ii
class Clock {
  double Now();
};
template <class T> static void Foo(Clock* clock) {
  const int now = clock->Now();
}
$ g++ -std=c++0x -fsyntax-only test.ii
test.ii: In function ‘void Foo(Clock*)’:
test.ii:5:30: internal compiler error: unexpected expression ‘clock->’ of kind
arrow_expr
Please submit a full bug report,


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

* [Bug c++/51150] [C++11][4.6/4.7 Regression] ICE when result of -> initializes const variable of different type
  2011-11-16  5:31 [Bug c++/51150] New: [C++11][4.6 Regression] ICE when result of -> initializes const variable of different type jyasskin at gcc dot gnu.org
@ 2011-11-16  5:37 ` jyasskin at gcc dot gnu.org
  2011-11-16  6:14 ` jyasskin at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jyasskin at gcc dot gnu.org @ 2011-11-16  5:37 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey Yasskin <jyasskin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[C++11][4.6 Regression] ICE |[C++11][4.6/4.7 Regression]
                   |when result of ->           |ICE when result of ->
                   |initializes const variable  |initializes const variable
                   |of different type           |of different type

--- Comment #1 from Jeffrey Yasskin <jyasskin at gcc dot gnu.org> 2011-11-16 05:17:28 UTC ---
This ICE didn't happen with 4.6.1, and it does happen with trunk@181400.


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

* [Bug c++/51150] [C++11][4.6/4.7 Regression] ICE when result of -> initializes const variable of different type
  2011-11-16  5:31 [Bug c++/51150] New: [C++11][4.6 Regression] ICE when result of -> initializes const variable of different type jyasskin at gcc dot gnu.org
  2011-11-16  5:37 ` [Bug c++/51150] [C++11][4.6/4.7 " jyasskin at gcc dot gnu.org
@ 2011-11-16  6:14 ` jyasskin at gcc dot gnu.org
  2011-11-16 13:43 ` paolo.carlini at oracle dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jyasskin at gcc dot gnu.org @ 2011-11-16  6:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jeffrey Yasskin <jyasskin at gcc dot gnu.org> 2011-11-16 05:30:12 UTC ---
And here's a similar test case using static_cast instead of ->:


$ cat test.ii
template <class T> void Foo(int val) {
  const int now = static_cast<float>(val);
}
$ g++ -std=c++0x test.ii -fsyntax-only
test.ii: In function ‘void Foo(int)’:
test.ii:2:41: internal compiler error: unexpected expression
‘static_cast<float>(val)’ of kind static_cast_expr
Please submit a full bug report,


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

* [Bug c++/51150] [C++11][4.6/4.7 Regression] ICE when result of -> initializes const variable of different type
  2011-11-16  5:31 [Bug c++/51150] New: [C++11][4.6 Regression] ICE when result of -> initializes const variable of different type jyasskin at gcc dot gnu.org
  2011-11-16  5:37 ` [Bug c++/51150] [C++11][4.6/4.7 " jyasskin at gcc dot gnu.org
  2011-11-16  6:14 ` jyasskin at gcc dot gnu.org
@ 2011-11-16 13:43 ` paolo.carlini at oracle dot com
  2011-11-16 13:51 ` paolo.carlini at oracle dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-11-16 13:43 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-11-16
     Ever Confirmed|0                           |1


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

* [Bug c++/51150] [C++11][4.6/4.7 Regression] ICE when result of -> initializes const variable of different type
  2011-11-16  5:31 [Bug c++/51150] New: [C++11][4.6 Regression] ICE when result of -> initializes const variable of different type jyasskin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-11-16 13:43 ` paolo.carlini at oracle dot com
@ 2011-11-16 13:51 ` paolo.carlini at oracle dot com
  2011-11-18 14:08 ` paolo.carlini at oracle dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-11-16 13:51 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com


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

* [Bug c++/51150] [C++11][4.6/4.7 Regression] ICE when result of -> initializes const variable of different type
  2011-11-16  5:31 [Bug c++/51150] New: [C++11][4.6 Regression] ICE when result of -> initializes const variable of different type jyasskin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-11-16 13:51 ` paolo.carlini at oracle dot com
@ 2011-11-18 14:08 ` paolo.carlini at oracle dot com
  2011-11-18 15:09 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-11-18 14:08 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
         AssignedTo|paolo.carlini at oracle dot |unassigned at gcc dot
                   |com                         |gnu.org


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

* [Bug c++/51150] [C++11][4.6/4.7 Regression] ICE when result of -> initializes const variable of different type
  2011-11-16  5:31 [Bug c++/51150] New: [C++11][4.6 Regression] ICE when result of -> initializes const variable of different type jyasskin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-11-18 14:08 ` paolo.carlini at oracle dot com
@ 2011-11-18 15:09 ` paolo.carlini at oracle dot com
  2011-11-18 15:52 ` paolo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-11-18 15:09 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-11-18 14:08:44 UTC ---
Let's try again ;)


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

* [Bug c++/51150] [C++11][4.6/4.7 Regression] ICE when result of -> initializes const variable of different type
  2011-11-16  5:31 [Bug c++/51150] New: [C++11][4.6 Regression] ICE when result of -> initializes const variable of different type jyasskin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-11-18 15:09 ` paolo.carlini at oracle dot com
@ 2011-11-18 15:52 ` paolo at gcc dot gnu.org
  2011-11-18 15:54 ` paolo at gcc dot gnu.org
  2011-11-18 16:03 ` paolo.carlini at oracle dot com
  8 siblings, 0 replies; 10+ messages in thread
From: paolo at gcc dot gnu.org @ 2011-11-18 15:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-11-18 15:31:45 UTC ---
Author: paolo
Date: Fri Nov 18 15:31:38 2011
New Revision: 181478

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181478
Log:
/cp
2011-11-18  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/51150
    * pt.c (tsubst_copy_and_build): Handle FIX_TRUNC_EXPR.

/testsuite
2011-11-18  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/51150
    * g++.dg/cpp0x/pr51150.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/pr51150.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/51150] [C++11][4.6/4.7 Regression] ICE when result of -> initializes const variable of different type
  2011-11-16  5:31 [Bug c++/51150] New: [C++11][4.6 Regression] ICE when result of -> initializes const variable of different type jyasskin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2011-11-18 15:52 ` paolo at gcc dot gnu.org
@ 2011-11-18 15:54 ` paolo at gcc dot gnu.org
  2011-11-18 16:03 ` paolo.carlini at oracle dot com
  8 siblings, 0 replies; 10+ messages in thread
From: paolo at gcc dot gnu.org @ 2011-11-18 15:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-11-18 15:51:47 UTC ---
Author: paolo
Date: Fri Nov 18 15:51:41 2011
New Revision: 181479

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181479
Log:
/cp
2011-11-18  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/51150
    * pt.c (tsubst_copy_and_build): Handle FIX_TRUNC_EXPR.

/testsuite
2011-11-18  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/51150
    * g++.dg/cpp0x/pr51150.C: New.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/pr51150.C
Modified:
    branches/gcc-4_6-branch/gcc/cp/ChangeLog
    branches/gcc-4_6-branch/gcc/cp/pt.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


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

* [Bug c++/51150] [C++11][4.6/4.7 Regression] ICE when result of -> initializes const variable of different type
  2011-11-16  5:31 [Bug c++/51150] New: [C++11][4.6 Regression] ICE when result of -> initializes const variable of different type jyasskin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2011-11-18 15:54 ` paolo at gcc dot gnu.org
@ 2011-11-18 16:03 ` paolo.carlini at oracle dot com
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-11-18 16:03 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.6.3

--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-11-18 15:52:30 UTC ---
Fixed for 4.6.3 and mainline.


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

end of thread, other threads:[~2011-11-18 15:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-16  5:31 [Bug c++/51150] New: [C++11][4.6 Regression] ICE when result of -> initializes const variable of different type jyasskin at gcc dot gnu.org
2011-11-16  5:37 ` [Bug c++/51150] [C++11][4.6/4.7 " jyasskin at gcc dot gnu.org
2011-11-16  6:14 ` jyasskin at gcc dot gnu.org
2011-11-16 13:43 ` paolo.carlini at oracle dot com
2011-11-16 13:51 ` paolo.carlini at oracle dot com
2011-11-18 14:08 ` paolo.carlini at oracle dot com
2011-11-18 15:09 ` paolo.carlini at oracle dot com
2011-11-18 15:52 ` paolo at gcc dot gnu.org
2011-11-18 15:54 ` paolo at gcc dot gnu.org
2011-11-18 16:03 ` paolo.carlini at oracle dot com

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