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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

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

--- Comment #4 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
I know nothing about the PA back-end, or whether E_VOIDmode is valid for
base14_operand, however...

Before r196122, a VOIDmode would return the default value of false in
base14_operand, but when S?mode and D?mode's were collapsed with the
aforementioned patch, we started handling VOIDmode.  This can trigger a
division by 0.  The untested patch below fixes this problem:

diff --git a/gcc/config/pa/predicates.md b/gcc/config/pa/predicates.md
index 4600f988c87..f7961cc7f88 100644
--- a/gcc/config/pa/predicates.md
+++ b/gcc/config/pa/predicates.md
@@ -275,6 +275,7 @@
     case E_BLKmode:
     case E_QImode:
     case E_HImode:
+    case E_VOIDmode:
       return true;

Again, I have no knowledge of the PA port, and I don't know if
pa_legitimate_address_p() is supposed to even handle E_VOIDmode.

Perhaps a PA maintainer can comment.

Reply via email to