Could a gatekeeper review and approve the attached  patch for bug #726?

Below is a description of the problem and it's fix.

Thanks
Bob Scollard

-------------------------------------------------
The problem occurs when IPA tries to inline a function pointer that:
  - has varargs,
  - is determined to be partially inlinable (see 
Identify_Partial_Inline_Candiate() and
    Has_Partial_Inline_Attrib()), and
  -  has a void return type.
The assert failure occurs in function ST_Type when called from
ipo_inline.cxx:IPO_INLINE::Post_Process_Caller  because it is not recognized
that the callee has a void return type.  The return type is not recognized as
void because the call to aux.rp.size () returns a value greater than zero.

Member rp of struct IPO_INLINE_AUX is of type class RETURN_PREG. Class
RETURN_PREG contains the union (see ipa/main/optimize/ipo_inline_util.h ):

    union {
        DEDICATED_RETURN_PREGS old_style; // no OPR_RETURN_VAL
        NEGATIVE_RETURN_PREGS new_style; // use OPR_RETURN_VAL
    } _u;

and uses the BOOL member use_return_val as a tag field where a TRUE value
indicates that new_style field should be used (and a FALSE value indicates that
the old_style field should be used).  The RETURN_PREG constructor initializes
use_return_val to TRUE  but initializes the old_style data item. The member
function RETURN_PREG::size() checks the use_return_val returning:

  return use_return_val ? 1 : _u.old_style.num_pregs;

causing a size greater than zero (i.e., 1) for a function returning void.

The fix is to change the RETURN_PREG constructor to set the use_return_val to
FALSE.


Attachment: 726.p
Description: 726.p

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to