summaryrefslogtreecommitdiff
path: root/gcc/c-family/c-opts.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-06 10:46:18 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-06 10:46:18 +0000
commitbbb88b31bafc19d1814c8e91762f403371beb08e (patch)
tree115b7f066f20ecfeb1c96f5a0680b85f748cc4ac /gcc/c-family/c-opts.c
parentd72243e82e40042c7140a79796d228952a9ba328 (diff)
downloadgcc-bbb88b31bafc19d1814c8e91762f403371beb08e.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210100 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family/c-opts.c')
-rw-r--r--gcc/c-family/c-opts.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index e162e49a18a..29e9a355bee 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -851,6 +851,12 @@ c_common_post_options (const char **pfilename)
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. */