re PR c++/85045 (ICE+SIGILL on valid C++ code: cxx_pretty_printer::postfix_expressio...
authorMarek Polacek <polacek@redhat.com>
Fri, 23 Mar 2018 13:45:49 +0000 (13:45 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 23 Mar 2018 13:45:49 +0000 (13:45 +0000)
commit889a3a30d0aea481e3452b0f2e25d0c4657b2f21
treefc1c62177a423979c20c5e60bee08115590ffda3
parent50531a2a1d82e41a39d0c85421b4e99802d6e349
re PR c++/85045 (ICE+SIGILL on valid C++ code:  cxx_pretty_printer::postfix_expression(tree_node*) (), at  cp/cxx-pretty-print.c:482)

PR c++/85045
* c-pretty-print.c (c_pretty_printer::multiplicative_expression)
<case RDIV_EXPR>: Tweak condition.

* cxx-pretty-print.c (cxx_pretty_printer::multiplicative_expression):
Handle EXACT_DIV_EXPR and RDIV_EXPR.  Tweak condition.
(cxx_pretty_printer::expression): Handle EXACT_DIV_EXPR and RDIV_EXPR.

* g++.dg/cpp0x/Wnarrowing5.C: New test.
* gcc.dg/pr85045.c: New test.

From-SVN: r258804
gcc/c-family/ChangeLog
gcc/c-family/c-pretty-print.c
gcc/cp/ChangeLog
gcc/cp/cxx-pretty-print.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/Wnarrowing5.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr85045.c [new file with mode: 0644]