On Tue, May 06, 2014 at 11:19:58AM +0200, Richard Biener wrote:
> 
> While I'd still like to detect the obvious wrong cases like outlined
> in comment #27 of the PR the following makes the seemingly obvious
> workarounds work (use -fno-builtin, -ffreestanding or -fno-hosted).
> 
> Ok for trunk and branches?

LGTM.

> 2014-05-06  Richard Biener  <rguent...@suse.de>
> 
>       c-family/
>       * c-opts.c (c_common_post_options): For -freestanding,
>       -fno-hosted and -fno-builtin disable pattern recognition
>       if not enabled explicitely.
> 
> Index: gcc/c-family/c-opts.c
> ===================================================================
> *** gcc/c-family/c-opts.c     (revision 210097)
> --- gcc/c-family/c-opts.c     (working copy)
> *************** c_common_post_options (const char **pfil
> *** 851,856 ****
> --- 851,862 ----
>     if (flag_objc_exceptions && !flag_objc_sjlj_exceptions)
>       flag_exceptions = 1;
>   
> +   /* If -ffreestanding, -fno-hosted or -fno-builtin then disable
> +      pattern recognition.  */
> +   if (!global_options_set.x_flag_tree_loop_distribute_patterns
> +       && flag_no_builtin)
> +     flag_tree_loop_distribute_patterns = 0;
> + 
>     /* -Woverlength-strings is off by default, but is enabled by -Wpedantic.
>        It is never enabled in C++, as the minimum limit is not normative
>        in that standard.  */

        Jakub

Reply via email to