[Bug rtl-optimization/84713] New: ANY_RETURN_P does't check all SIMPLE_RETURNs

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Mar 5 12:50:00 GMT 2018


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

            Bug ID: 84713
           Summary: ANY_RETURN_P does't check all SIMPLE_RETURNs
           Product: gcc
           Version: 8.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

rtl.h has

/* Predicate yielding nonzero iff X is a return or simple_return.  */
#define ANY_RETURN_P(X) \
  (GET_CODE (X) == RETURN || GET_CODE (X) == SIMPLE_RETURN)

But on x86, for

void
__attribute__((interrupt))
fn (void* frame)
{
}

we generate:

(jump_insn 13 12 14 2 (parallel [
            (simple_return)
            (unspec [
                    (const_int 0 [0])
                ] UNSPEC_INTERRUPT_RETURN)
        ]) "/tmp/y.i":5 -1
     (nil)
 -> simple_return)

But ANY_RETURN_P returns false.


More information about the Gcc-bugs mailing list