diff mbox series

PR 80867: ICE during -O3 compile of libgnat

Message ID caff178a-9fc2-efa3-372b-efa0c4cc9a84@linux.vnet.ibm.com
State New
Headers show
Series PR 80867: ICE during -O3 compile of libgnat | expand

Commit Message

Kelvin Nilsen Jan. 29, 2018, 10:37 p.m. UTC
It was determined that the reported ICE occurs because a NULL value is
passed from vectorizable_call () to

   targetm.vectorize.builtin_md_vectorized_function (
		callee, vectype_out, vectype_in).

This patch avoids making this call if callee equals NULL.

After successful bootstrap and regression testing, with preapproval,
this patch has been committed to the trunk.

It it ok to backport to GCC 7 and GCC 6 (after testing on those
platforms)?

Thanks.


gcc/ChangeLog:

2018-01-29  Richard Biener <rguenther@suse.de>
	    Kelvin Nilsen  <kelvin@gcc.gnu.org>

	PR bootstrap/80867
	* tree-vect-stmts.c (vectorizable_call): Don't call
	targetm.vectorize_builtin_md_vectorized_function if callee is
	NULL.

Comments

Richard Biener Jan. 30, 2018, 7:43 a.m. UTC | #1
On Mon, 29 Jan 2018, Kelvin Nilsen wrote:

> It was determined that the reported ICE occurs because a NULL value is
> passed from vectorizable_call () to
> 
>    targetm.vectorize.builtin_md_vectorized_function (
> 		callee, vectype_out, vectype_in).
> 
> This patch avoids making this call if callee equals NULL.
> 
> After successful bootstrap and regression testing, with preapproval,
> this patch has been committed to the trunk.
> 
> It it ok to backport to GCC 7 and GCC 6 (after testing on those
> platforms)?

OK.

Thanks,
Richard.

> Thanks.
> 
> 
> gcc/ChangeLog:
> 
> 2018-01-29  Richard Biener <rguenther@suse.de>
> 	    Kelvin Nilsen  <kelvin@gcc.gnu.org>
> 
> 	PR bootstrap/80867
> 	* tree-vect-stmts.c (vectorizable_call): Don't call
> 	targetm.vectorize_builtin_md_vectorized_function if callee is
> 	NULL.
> 
> Index: gcc/tree-vect-stmts.c
> ===================================================================
> --- gcc/tree-vect-stmts.c	(revision 257105)
> +++ gcc/tree-vect-stmts.c	(working copy)
> @@ -3159,7 +3159,7 @@
>        if (cfn != CFN_LAST)
>  	fndecl = targetm.vectorize.builtin_vectorized_function
>  	  (cfn, vectype_out, vectype_in);
> -      else
> +      else if (callee)
>  	fndecl = targetm.vectorize.builtin_md_vectorized_function
>  	  (callee, vectype_out, vectype_in);
>      }
> 
>
diff mbox series

Patch

Index: gcc/tree-vect-stmts.c
===================================================================
--- gcc/tree-vect-stmts.c	(revision 257105)
+++ gcc/tree-vect-stmts.c	(working copy)
@@ -3159,7 +3159,7 @@ 
       if (cfn != CFN_LAST)
 	fndecl = targetm.vectorize.builtin_vectorized_function
 	  (cfn, vectype_out, vectype_in);
-      else
+      else if (callee)
 	fndecl = targetm.vectorize.builtin_md_vectorized_function
 	  (callee, vectype_out, vectype_in);
     }