Fix broken type comparison assert
authorNathan Sidwell <nathan@acm.org>
Thu, 27 Feb 2020 14:34:23 +0000 (06:34 -0800)
committerNathan Sidwell <nathan@acm.org>
Thu, 27 Feb 2020 14:34:23 +0000 (06:34 -0800)
commitda5f369df6dc500183737e251eb19d91f899b92d
tree8a092dec50f1b1a78e0ef7516058c9e0d8a1b0b0
parente94f2542305ccb5c4a3c4e5e8212713747623417
Fix broken type comparison assert

In implementing Jason's suggested direction for 93933, the compiler
exploded in a surprising way.  Turns out an assert had been passing
NULLS to comptypes, and therefore not checking what it intended.

Further comptypes, could silently accept such nulls under most
circumstances.

* class.c (adjust_clone_args): Correct arg-checking assert.
* typeck.c (comptypes): Assert not nulls.
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/typeck.c