https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70153
Marek Polacek changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70153
--- Comment #7 from Marek Polacek ---
Author: mpolacek
Date: Thu Mar 10 15:13:01 2016
New Revision: 234111
URL: https://gcc.gnu.org/viewcvs?rev=234111&root=gcc&view=rev
Log:
PR c++/70153
* cp-gimplify.c (cp_fold): Handle UNARY_PL
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70153
Marek Polacek changed:
What|Removed |Added
Status|NEW |ASSIGNED
Assignee|unassigned a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70153
--- Comment #6 from Marek Polacek ---
A run-time test:
unsigned long long int
foo (unsigned long long int i)
{
return 2ULL * ((1 + (unsigned long int) +1) * i);
}
int
main (void)
{
if (foo (3ULL) != 12ULL)
__builtin_abort ();
}
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70153
--- Comment #5 from Marek Polacek ---
It appears that cp_fold isn't handling UNARY_PLUS_EXPR properly. I've modified
the code according to the UNARY_PLUS_EXPR handling in
cxx_eval_constant_expression like this:
--- a/gcc/cp/cp-gimplify.c
+++ b/
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70153
--- Comment #4 from Marek Polacek ---
Slightly cleaned up test case:
void
foo ()
{
unsigned long long int i = 0ULL;
unsigned long long int v;
v = 2ULL * ((1 + (unsigned long int) +1) * i);
}
Note the +1 - without the '+' this problem does
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70153
Richard Biener changed:
What|Removed |Added
Priority|P3 |P1
Target Milestone|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70153
Marek Polacek changed:
What|Removed |Added
CC||mpolacek at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70153
Markus Trippelsdorf changed:
What|Removed |Added
Target|x86_64 |
--- Comment #2 from Markus Trippe
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70153
Markus Trippelsdorf changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
10 matches
Mail list logo