http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978
--- Comment #20 from janus at gcc dot gnu.org 2013-02-06 12:54:41 UTC --- (In reply to comment #19) > That generates the code: > D.1896 = x != 0B > ? (struct array1_integer(kind=4) *) _gfortran_internal_pack (x) > : 0B; > two (D.1896); > if (x != 0B > && (integer(kind=4)[0:] *) x->data != (integer(kind=4)[0:] *) D.1896) > > I think it should be "x != 0B && x->data != 0B" in the first condition. I don't see how this would help (if x is anyway OB, as it is the case for your second call). Moreover, it seems to fail only *after* the call to 'two', probably in the if statement you show. The failure only happens at -O0 for me.