&& (tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (nparm)))
<= 4 * UNITS_PER_WORD))))
{
- /* No point in indirecting pointer types. Presumably they
- won't ever pass the size-based test above, but check the
- assumption here, because getting this wrong would mess
- with attribute access and possibly others. We deal with
- fn spec below. */
- gcc_checking_assert (!POINTER_TYPE_P (TREE_TYPE (nparm)));
+ /* No point in indirecting pointer types, unless they're
+ volatile. Presumably they won't ever pass the size-based
+ test above, but check the assumption here, because
+ getting this wrong would mess with attribute access and
+ possibly others. We deal with fn spec below. */
+ gcc_checking_assert (!POINTER_TYPE_P (TREE_TYPE (nparm))
+ || TREE_THIS_VOLATILE (parm));
indirect_nparms.add (nparm);
--- /dev/null
+/* { dg-require-effective-target strub } */
+/* { dg-do compile } */
+/* { dg-options "-fstrub=all -O2" } */
+
+void rb_ec_error_print(struct rb_execution_context_struct *volatile) {}