summaryrefslogtreecommitdiff
path: root/gcc/go/go-lang.c
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-06 15:14:28 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-06 15:14:28 +0000
commit87351ae8912b4a08209db17300d5b679e55db82f (patch)
tree871252222629feb4c39607742bae1bfae99fd877 /gcc/go/go-lang.c
parent99f6be4b59c7a6f7076102291e61cca12f813de8 (diff)
downloadgcc-87351ae8912b4a08209db17300d5b679e55db82f.tar.gz
* go-lang.c (go_langhook_post_options): If
-fisolate-erroneous-paths was turned on by an optimization option, turn it off. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204459 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/go/go-lang.c')
-rw-r--r--gcc/go/go-lang.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c
index 37d61d1f5d7..14080f098c8 100644
--- a/gcc/go/go-lang.c
+++ b/gcc/go/go-lang.c
@@ -268,6 +268,12 @@ go_langhook_post_options (const char **pfilename ATTRIBUTE_UNUSED)
if (flag_excess_precision_cmdline == EXCESS_PRECISION_DEFAULT)
flag_excess_precision_cmdline = EXCESS_PRECISION_STANDARD;
+ /* The isolate_erroneous_paths optimization can change a nil
+ dereference from a panic to a trap, so we have to disable it for
+ Go, even though it is normally enabled by -O2. */
+ if (!global_options_set.x_flag_isolate_erroneous_paths)
+ global_options.x_flag_isolate_erroneous_paths = 0;
+
/* Returning false means that the backend should be used. */
return false;
}