public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64106] [5 Regression][C++14] internal compiler error: in cxx_eval_store_expression
       [not found] <bug-64106-4@http.gcc.gnu.org/bugzilla/>
@ 2014-12-03 10:12 ` mpolacek at gcc dot gnu.org
  2014-12-03 10:53 ` ktietz at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-12-03 10:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64106

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-12-03
                 CC|                            |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |5.0
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.  Works with -std=c++11.  They might be dupes, but this one looks
valid.


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

* [Bug c++/64106] [5 Regression][C++14] internal compiler error: in cxx_eval_store_expression
       [not found] <bug-64106-4@http.gcc.gnu.org/bugzilla/>
  2014-12-03 10:12 ` [Bug c++/64106] [5 Regression][C++14] internal compiler error: in cxx_eval_store_expression mpolacek at gcc dot gnu.org
@ 2014-12-03 10:53 ` ktietz at gcc dot gnu.org
  2014-12-03 10:57 ` mpolacek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: ktietz at gcc dot gnu.org @ 2014-12-03 10:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64106

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktietz at gcc dot gnu.org

--- Comment #2 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Yes, issue is caused by prefix of INDIRECT_REF.

The following patch solves this issue for me:

Index: constexpr.c
===================================================================
--- constexpr.c (Revision 218142)
+++ constexpr.c (Arbeitskopie)
@@ -2486,7 +2550,9 @@ cxx_eval_store_expression (const constexpr_ctx *ct
          vec_safe_push (refs, TREE_TYPE (probe));
          probe = TREE_OPERAND (probe, 0);
          break;
-
+       case INDIRECT_REF:
+         probe = TREE_OPERAND (probe, 0);
+         break;
        default:
          object = probe;
          gcc_assert (DECL_P (object));


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

* [Bug c++/64106] [5 Regression][C++14] internal compiler error: in cxx_eval_store_expression
       [not found] <bug-64106-4@http.gcc.gnu.org/bugzilla/>
  2014-12-03 10:12 ` [Bug c++/64106] [5 Regression][C++14] internal compiler error: in cxx_eval_store_expression mpolacek at gcc dot gnu.org
  2014-12-03 10:53 ` ktietz at gcc dot gnu.org
@ 2014-12-03 10:57 ` mpolacek at gcc dot gnu.org
  2014-12-03 10:57 ` mpolacek at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-12-03 10:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64106

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I have a similar patch:

--- a/gcc/cp/constexpr.c
+++ b/gcc/cp/constexpr.c
@@ -2581,6 +2581,12 @@ cxx_eval_store_expression (const constexpr_ctx *ctx,
tree t,
          probe = TREE_OPERAND (probe, 0);
          break;

+       case INDIRECT_REF:
+         vec_safe_push (refs, TREE_OPERAND (probe, 0));
+         vec_safe_push (refs, TREE_TYPE (probe));
+         probe = TREE_OPERAND (probe, 0);
+         break;
+
        default:
          object = probe;
          gcc_assert (DECL_P (object));


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

* [Bug c++/64106] [5 Regression][C++14] internal compiler error: in cxx_eval_store_expression
       [not found] <bug-64106-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2014-12-03 10:57 ` mpolacek at gcc dot gnu.org
@ 2014-12-03 10:57 ` mpolacek at gcc dot gnu.org
  2014-12-03 11:26 ` ktietz at gcc dot gnu.org
  2014-12-04 19:37 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-12-03 10:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64106

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Slightly reduced testcase:

void
f (int &c, int &lc)
{
  c >> (lc -= 8);
}


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

* [Bug c++/64106] [5 Regression][C++14] internal compiler error: in cxx_eval_store_expression
       [not found] <bug-64106-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2014-12-03 10:57 ` mpolacek at gcc dot gnu.org
@ 2014-12-03 11:26 ` ktietz at gcc dot gnu.org
  2014-12-04 19:37 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: ktietz at gcc dot gnu.org @ 2014-12-03 11:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64106

--- Comment #5 from Kai Tietz <ktietz at gcc dot gnu.org> ---
+         vec_safe_push (refs, TREE_OPERAND (probe, 0));
+         vec_safe_push (refs, TREE_TYPE (probe));
^
This looks to me wrong. INDIRECT_REF has just one argument, and is directly
associated to underlying decl, so I don't see a reason to put it into the
refs-vector.  To initialize it no additional constructor is required AFAICS. 
But I might be wrong


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

* [Bug c++/64106] [5 Regression][C++14] internal compiler error: in cxx_eval_store_expression
       [not found] <bug-64106-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2014-12-03 11:26 ` ktietz at gcc dot gnu.org
@ 2014-12-04 19:37 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2014-12-04 19:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64106

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jason at gcc dot gnu.org
         Resolution|---                         |DUPLICATE

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed by patch for bug 64080.

*** This bug has been marked as a duplicate of bug 64080 ***


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

end of thread, other threads:[~2014-12-04 19:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-64106-4@http.gcc.gnu.org/bugzilla/>
2014-12-03 10:12 ` [Bug c++/64106] [5 Regression][C++14] internal compiler error: in cxx_eval_store_expression mpolacek at gcc dot gnu.org
2014-12-03 10:53 ` ktietz at gcc dot gnu.org
2014-12-03 10:57 ` mpolacek at gcc dot gnu.org
2014-12-03 10:57 ` mpolacek at gcc dot gnu.org
2014-12-03 11:26 ` ktietz at gcc dot gnu.org
2014-12-04 19:37 ` jason at gcc dot gnu.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).