On Wed, Dec 4, 2013 at 7:19 PM, Jeff Law <l...@redhat.com> wrote: > As discussed late in this thread: > > http://gcc.gnu.org/ml/gcc/2013-11/msg00345.html > > > This patch splits up the erroneous path optimization into two pieces. One > which detects NULL dereferences and isolates those paths and a second which > detects passing/returning a NULL pointer in cases where an attribute says a > non-NULL value is required. > > The former is enabled by default at -O2, the latter is not enabled by > default at any optimization level. > > Bootstrapped & regression tested on x86_64-unknown-linux-gnu. Installed on > the trunk. > > The next cleanup will be to add the warning as discussed in the same thread. > > Jeff > > * common.opt: Split up -fisolate-erroneous-paths into > -fisolate-erroneous-paths-dereference and > -fisolate-erroneous-paths-attribute. > * invoke.texi: Corresponding changes. > * gimple.c (infer_nonnull_range): Add and use new arguments > to control what kind of statements can be used to infer a > non-null range. > * gimple.h (infer_nonnull_range): Update prototype. > * tree-vrp.c (infer_value_range): Corresponding changes. > * opts.c (default_options_table): Update due to option split. > * gimple-ssa-isolate-paths.c: Fix trailing whitespace. > (find_implicit_erroneous_behaviour): Pass additional arguments > to infer_nonnull_range. > (find_explicit_erroneous_behaviour): Similarly. > (gate_isolate_erroneous_paths): Check both of the new > options. >
It breaks go: /export/gnu/import/git/gcc/gcc/go/go-lang.c:276:27: error: \u2018struct gcc_options\u2019 has no member named \u2018x_flag_isolate_erroneous_paths\u2019 if (!global_options_set.x_flag_isolate_erroneous_paths) ^ /export/gnu/import/git/gcc/gcc/go/go-lang.c:277:20: error: \u2018struct gcc_options\u2019 has no member named \u2018x_flag_isolate_erroneous_paths\u2019 global_options.x_flag_isolate_erroneous_paths = 0; ^ -- H.J.