Author: rscollar Date: 2011-02-17 13:49:09 -0500 (Thu, 17 Feb 2011) New Revision: 3480
Modified: trunk/osprey/ipa/main/optimize/ipo_inline_util.h Log: Fix for 726. 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 a 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. Approved by: Roy Ju. Modified: trunk/osprey/ipa/main/optimize/ipo_inline_util.h =================================================================== --- trunk/osprey/ipa/main/optimize/ipo_inline_util.h 2011-02-17 00:19:46 UTC (rev 3479) +++ trunk/osprey/ipa/main/optimize/ipo_inline_util.h 2011-02-17 18:49:09 UTC (rev 3480) @@ -126,7 +126,7 @@ public: - RETURN_PREG () : use_return_val (TRUE) { + RETURN_PREG () : use_return_val (FALSE) { _u.old_style.num_pregs = 0; } ------------------------------------------------------------------------------ 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