This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gomp5] Iterator fixes


On Thu, Aug 02, 2018 at 08:28:22PM +0200, Jakub Jelinek wrote:
> --- gcc/c/c-typeck.c.jj	2018-08-01 17:00:46.329549760 +0200
> +++ gcc/c/c-typeck.c	2018-08-02 18:57:31.969477582 +0200
> @@ -13112,6 +13112,7 @@ c_omp_finish_iterators (tree iter)
>        tree begin = TREE_VEC_ELT (it, 1);
>        tree end = TREE_VEC_ELT (it, 2);
>        tree step = TREE_VEC_ELT (it, 3);
> +      tree orig_step;
>        tree type = TREE_TYPE (var);
>        location_t loc = DECL_SOURCE_LOCATION (var);
>        if (type == error_mark_node)
> @@ -13138,11 +13139,24 @@ c_omp_finish_iterators (tree iter)
>  	  ret = true;
>  	  continue;
>  	}
> -
> +      else if (step == error_mark_node
> +	       || TREE_TYPE (step) == error_mark_node)

You can use error_operand_p for this.

Marek


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]