This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Disable -ftree-loop-distribute-patterns for -ffreestanding, PR56888
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 6 May 2014 11:26:11 +0200
- Subject: Re: [PATCH] Disable -ftree-loop-distribute-patterns for -ffreestanding, PR56888
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1405061118200 dot 18709 at zhemvz dot fhfr dot qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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 <rguenther@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