Hi,
Can a gatekeeper please review the patch below?
Index: osprey-gcc-4.2.0/gcc/tree-inline.c
===================================================================
--- osprey-gcc-4.2.0/gcc/tree-inline.c (revision 3599)
+++ osprey-gcc-4.2.0/gcc/tree-inline.c (working copy)
@@ -2028,6 +2028,7 @@
{
if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn))
/* Avoid warnings during early inline pass. */
+ && !DECL_IN_SYSTEM_HEADER (fn)
&& (!flag_unit_at_a_time || cgraph_global_info_ready))
{
sorry ("inlining failed in call to %q+F: %s", fn, reason);
Failing testcase when compiled with 'openCC -Winline':
#include <xmmintrin.h>
typedef __m64 m64;
m64 add(const m64 &a, const m64 &b) {
return _mm_adds_pu16 (a, b);
}
int main()
{
m64 a,b;
add(a,b);
return 0;
}
Problem/Fix Description:
When is compiled with -Winline, the above testcase gives the message:
...lib/gcc/x86_64-redhat-linux/4.2.0/include/mmintrin.h: In function 'int
__vector__ add(const int __vector__&, const int __vector__&)'
.../lib/gcc/x86_64-redhat-linux/4.2.0/include/mmintrin.h:361: sorry,
unimplemented: inlining failed in call to 'int __vector__ _mm_adds_pu16(int
__vector__, int __vector__)': function not inlinable
<testcase>.cpp:5: sorry, unimplemented: called from here
gcc does not give an error message.
The problem is in file osprey-gcc-4.2.0/gcc/tree-inline.c, function
expand_call_inline. The fix is to emit no (error or warning) message if the
function marked for inlining is declared in a system header file.
Thanks.
Pallavi
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel