On 10/19/2015 02:31 AM, Marek Polacek wrote:
On Fri, Oct 16, 2015 at 02:07:51PM -1000, Jason Merrill wrote:
On 10/16/2015 07:35 AM, Marek Polacek wrote:
This code path seems to be for pushing a conversion down into a binary
expression.  We shouldn't do this at all when we aren't folding.

I tend to agree, but this case is tricky.  What's this code about is
e.g. for

int
fn (long p, long o)
{
   return p + o;
}

we want to narrow the operation and do the addition on unsigned ints and then
convert to int.  We do it here because we're still missing the
promotion/demotion pass on GIMPLE (PR45397 / PR47477).  Disabling this
optimization here would regress a few testcases, so I kept the code as it was.
Thoughts?

That makes sense, but please add a comment referring to one of those PRs and
also add a note to the PR about this place.  OK with that change.

Done.  But I can't seem to commit the patch to the c++-delayed-folding
branch; is that somehow restricted?  I'm getting:

svn: E170001: Commit failed (details follow):
svn: E170001: Authorization failed
svn: E170001: Your commit message was left in a temporary file:
svn: E170001:    '/home/marek/svn/c++-delayed-folding/svn-commit.tmp'

and I've checked out the branch using
svn co svn://mpola...@gcc.gnu.org/svn/gcc/branches/c++-delayed-folding/

You need to use svn+ssh:// rather than svn:// if you want to be able to commit. From svnwrite.html:

It is also possible to convert an existing SVN tree to use SSH by using svn switch --relocate:

svn switch --relocate svn://gcc.gnu.org/svn/gcc svn+ssh://usern...@gcc.gnu.org/svn/gcc

Jason

Reply via email to