Index: head/sys/ddb/db_expr.c =================================================================== --- head/sys/ddb/db_expr.c +++ head/sys/ddb/db_expr.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -229,7 +230,7 @@ lhs |= rhs; break; default: - __unreachable(); + __assert_unreachable(); } t = db_read_token(); } @@ -313,7 +314,7 @@ lhs = (lhs <= rhs); break; default: - __unreachable(); + __assert_unreachable(); } t = db_read_token(); } Index: head/sys/dev/amdtemp/amdtemp.c =================================================================== --- head/sys/dev/amdtemp/amdtemp.c +++ head/sys/dev/amdtemp/amdtemp.c @@ -666,7 +666,7 @@ temp |= AMDTEMP_TTSR_SELCORE; break; default: - __unreachable(); + __assert_unreachable(); } pci_write_config(dev, AMDTEMP_THERMTP_STAT, temp, 1); @@ -766,7 +766,7 @@ ("sensor %d: not valid", (int)sensor)); return (amdtemp_decode_fam10h_to_17h(sc->sc_offset, val, true)); default: - __unreachable(); + __assert_unreachable(); } } Index: head/sys/dev/nvdimm/nvdimm.c =================================================================== --- head/sys/dev/nvdimm/nvdimm.c +++ head/sys/dev/nvdimm/nvdimm.c @@ -35,6 +35,7 @@ #include "opt_ddb.h" #include +#include #include #include #include @@ -236,7 +237,7 @@ return (0); } } - __unreachable(); + __assert_unreachable(); } static int Index: head/sys/dev/ow/ow.c =================================================================== --- head/sys/dev/ow/ow.c +++ head/sys/dev/ow/ow.c @@ -507,7 +507,7 @@ return (EIO); goto again; default: /* NOTREACHED */ - __unreachable(); + __assert_unreachable(); } if (dir) { OWLL_WRITE_ONE(lldev, &timing_regular); Index: head/sys/net/mppcc.c =================================================================== --- head/sys/net/mppcc.c +++ head/sys/net/mppcc.c @@ -232,7 +232,7 @@ } else if (off < 8192) { /* 16-bit offset; 320 <= offset < 8192 */ putbits16(*dst, 0xc000|(off-320), 16, &olen, &l); } else { /* NOTREACHED */ - __unreachable(); + __assert_unreachable(); rtn &= ~MPPC_OK; return (rtn); } Index: head/sys/sys/systm.h =================================================================== --- head/sys/sys/systm.h +++ head/sys/sys/systm.h @@ -117,6 +117,9 @@ VNASSERT(exp, vp, ("condition %s not met at %s:%d (%s)", \ _exp, __FILE__, __LINE__, __func__)); \ } while (0) +#define __assert_unreachable() \ + panic("executing segment marked as unreachable at %s:%d (%s)\n", \ + __FILE__, __LINE__, __func__) #else #define KASSERT(exp,msg) do { \ } while (0) @@ -125,6 +128,7 @@ } while (0) #define VNPASS(exp, vp) do { \ } while (0) +#define __assert_unreachable() __unreachable() #endif #ifndef CTASSERT /* Allow lint to override */ Index: head/sys/vm/vm_radix.c =================================================================== --- head/sys/vm/vm_radix.c +++ head/sys/vm/vm_radix.c @@ -209,7 +209,7 @@ case SMR: return (smr_entered_load(p, vm_radix_smr)); } - __unreachable(); + __assert_unreachable(); } static __inline void