aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2015-12-04 19:04:06 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2015-12-04 19:04:06 +0100
commitb3d5bc621f9c7da0bbac965c610ae2a4044e1a68 (patch)
treed54e8d57bec108ea41968e0e24fe0a0cdeeb6eec /gcc
parent88636b62bc7fae0ef7eaac6a22e5cd8107e69be8 (diff)
downloadgcc-b3d5bc621f9c7da0bbac965c610ae2a4044e1a68.zip
gcc-b3d5bc621f9c7da0bbac965c610ae2a4044e1a68.tar.gz
gcc-b3d5bc621f9c7da0bbac965c610ae2a4044e1a68.tar.bz2
re PR middle-end/68656 (warning about disabled var-tracking uses odd location info)
PR c/68656 * toplev.c (init_asm_output): Pass UNKNOWN_LOCATION instead of input_location to inform. (process_options): Use warning_at (UNKNOWN_LOCATION instead of warning ( and error_at (UNKNOWN_LOCATION instead of error (. Pass UNKNOWN_LOCATION instead of input_location to fatal_error. * gcc.target/i386/pr65044.c: Expect error on line 0 rather than line 1. * g++.dg/opt/pr34036.C: Expect warning on line 0 rather than line 1. * gcc.dg/tree-ssa/pr23109.c: Likewise. * gcc.dg/tree-ssa/recip-5.c: Likewise. * gcc.dg/pr33007.c: Likewise. From-SVN: r231292
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog21
-rw-r--r--gcc/c-family/ChangeLog30
-rw-r--r--gcc/testsuite/ChangeLog10
-rw-r--r--gcc/testsuite/g++.dg/opt/pr34036.C2
-rw-r--r--gcc/testsuite/gcc.dg/pr33007.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr23109.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/recip-5.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr65044.c2
-rw-r--r--gcc/toplev.c94
9 files changed, 109 insertions, 56 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8b90447..5ff2fbf 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2015-12-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/68656
+ * toplev.c (init_asm_output): Pass UNKNOWN_LOCATION instead of
+ input_location to inform.
+ (process_options): Use warning_at (UNKNOWN_LOCATION instead of
+ warning ( and error_at (UNKNOWN_LOCATION instead of error (.
+ Pass UNKNOWN_LOCATION instead of input_location to fatal_error.
+
2015-12-04 Jan Hubicka <hubicka@ucw.cz>
* ipa-inline.c (can_inline_edge_p) Use merged_comdat.
@@ -9,11 +18,6 @@
* ipa-inline-analysis.c (simple_edge_hints): Check both merged_comdat
and icf_merged.
-2015-12-04 Paolo Bonzini <bonzini@gnu.org>
-
- * c-family/c-common.c (maybe_warn_shift_overflow): Warn on all
- overflows if shifting 1 out of the sign bit.
-
2015-12-04 Segher Boessenkool <segher@kernel.crashing.org>
* (cstore<mode>4_unsigned): Use gpc_reg_operand instead of
@@ -186,9 +190,6 @@
2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
- * c-family/c-common.c (c_common_attribute_table[]): Update max arguments
- count for "simd" attribute.
- (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
* doc/extend.texi ("simd"): Describe new flags.
2015-12-04 Ilya Enkovich <enkovich.gnu@gmail.com>
@@ -663,7 +664,6 @@
* tree-ssa-structalias.c (find_func_aliases_for_builtin_call)
(find_func_clobbers, ipa_pta_execute): Handle BUILT_IN_GOACC_PARALLEL.
->>>>>>> .r231221
2015-12-02 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (cstore_si_as_di): New expander.
@@ -18044,7 +18044,6 @@ broken.
2015-08-02 Martin Sebor <msebor@redhat.com>
- * c-family/c.opt (-Wframe-address): New warning option.
* doc/invoke.texi (Wframe-address): Document it.
* doc/extend.texi (__builtin_frame_address, __builtin_return_address):
Clarify possible effects of calling the functions with non-zero
@@ -26919,8 +26918,6 @@ broken.
2015-06-04 Sriraman Tallam <tmsriram@google.com>
- * c-family/c-common.c (noplt): New attribute.
- (handle_noplt_attribute): New handler.
* calls.c (prepare_call_address): Check for noplt
attribute.
* config/i386/i386.c (ix86_expand_call): Check
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index a6a4fc8..4668ce6 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,14 @@
+2015-12-04 Paolo Bonzini <bonzini@gnu.org>
+
+ * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
+ shifting 1 out of the sign bit.
+
+2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
+
+ * c-common.c (c_common_attribute_table[]): Update max arguments
+ count for "simd" attribute.
+ (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
+
2015-12-03 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/57580
@@ -256,8 +267,8 @@
2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
PR c++-common/67882
- * c-family/c-common.h (fold_offsetof_1): Add argument.
- * c-family/c-common.c (fold_offsetof_1): Diagnose more invalid
+ * c-common.h (fold_offsetof_1): Add argument.
+ * c-common.c (fold_offsetof_1): Diagnose more invalid
offsetof expressions that reference elements past the end of
an array.
@@ -571,6 +582,10 @@
* c-opts.c (set_std_cxx1z): Set flag_concepts.
* c.opt (fconcepts): New.
+2015-08-02 Martin Sebor <msebor@redhat.com>
+
+ * c.opt (-Wframe-address): New warning option.
+
2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
* c-indentation.c (should_warn_for_misleading_indentation):
@@ -720,11 +735,11 @@
2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
Implement N4197 - Adding u8 character literals
- * c-family/c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
+ * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
CPP_CHAR.
- * c-family/c-common.c (c_parse_error): Print CPP_UTF8CHAR and
+ * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
CPP_UTF8CHAR_USERDEF tokens.
- * c-family/c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
+ * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
and CPP_UTF8CHAR tokens.
(lex_charconst): Treat CPP_UTF8CHAR token.
@@ -882,6 +897,11 @@
* c-common.h (c_parse_final_cleanups): New prototype.
* c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
+2015-06-04 Sriraman Tallam <tmsriram@google.com>
+
+ * c-common.c (noplt): New attribute.
+ (handle_noplt_attribute): New handler.
+
2015-06-04 Andrew MacLeod <amacleod@redhat.com>
* array-notation-common.c: Adjust includes for restructured coretypes.h.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e9ad14a..b7effc3 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2015-12-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/68656
+ * gcc.target/i386/pr65044.c: Expect error on line 0 rather than
+ line 1.
+ * g++.dg/opt/pr34036.C: Expect warning on line 0 rather than line 1.
+ * gcc.dg/tree-ssa/pr23109.c: Likewise.
+ * gcc.dg/tree-ssa/recip-5.c: Likewise.
+ * gcc.dg/pr33007.c: Likewise.
+
2015-12-04 Paolo Bonzini <bonzini@gnu.org>
* c-c++-common/Wshift-overflow-1.c: Test shifting 1 out of the sign bit.
diff --git a/gcc/testsuite/g++.dg/opt/pr34036.C b/gcc/testsuite/g++.dg/opt/pr34036.C
index ecf6cf7..f4e18c8 100644
--- a/gcc/testsuite/g++.dg/opt/pr34036.C
+++ b/gcc/testsuite/g++.dg/opt/pr34036.C
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fnon-call-exceptions -ffast-math -fsignaling-nans" } */
-/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 1 } */
+/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 0 } */
template <class T>
class ggStaticArray {
diff --git a/gcc/testsuite/gcc.dg/pr33007.c b/gcc/testsuite/gcc.dg/pr33007.c
index 26b22fd..cdc8c6a 100644
--- a/gcc/testsuite/gcc.dg/pr33007.c
+++ b/gcc/testsuite/gcc.dg/pr33007.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O -ffast-math -ftrapping-math" } */
-/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 1 } */
+/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 0 } */
long
foo (int i)
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c b/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c
index fac991c..3ee6b7f 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -funsafe-math-optimizations -ftrapping-math -fdump-tree-recip -fdump-tree-lim2" } */
-/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 1 } */
+/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 0 } */
double F[2] = { 0., 0. }, e = 0.;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c b/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c
index 9a905b3..c45cf2f 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c
@@ -1,6 +1,6 @@
/* { dg-options "-O1 -funsafe-math-optimizations -ftrapping-math -fdump-tree-recip -fdump-tree-optimized" } */
/* { dg-do compile } */
-/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 1 } */
+/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 0 } */
/* Test the reciprocal optimizations together with trapping math. */
diff --git a/gcc/testsuite/gcc.target/i386/pr65044.c b/gcc/testsuite/gcc.target/i386/pr65044.c
index 4f318d6..8d3bc9b 100644
--- a/gcc/testsuite/gcc.target/i386/pr65044.c
+++ b/gcc/testsuite/gcc.target/i386/pr65044.c
@@ -1,7 +1,7 @@
-/* { dg-error "-fcheck-pointer-bounds is not supported with Address Sanitizer" } */
/* { dg-do compile } */
/* { dg-require-effective-target mpx } */
/* { dg-options "-fcheck-pointer-bounds -mmpx -fsanitize=address" } */
+/* { dg-error "-fcheck-pointer-bounds is not supported with Address Sanitizer" "" { target *-*-* } 0 } */
extern int x[];
diff --git a/gcc/toplev.c b/gcc/toplev.c
index aee55fc..6811004 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -904,7 +904,9 @@ init_asm_output (const char *name)
NULL);
}
else
- inform (input_location, "-frecord-gcc-switches is not supported by the current target");
+ inform (UNKNOWN_LOCATION,
+ "-frecord-gcc-switches is not supported by "
+ "the current target");
}
if (flag_verbose_asm)
@@ -1214,8 +1216,9 @@ process_options (void)
if (flag_section_anchors && !target_supports_section_anchors_p ())
{
- warning (OPT_fsection_anchors,
- "this target does not support %qs", "-fsection-anchors");
+ warning_at (UNKNOWN_LOCATION, OPT_fsection_anchors,
+ "this target does not support %qs",
+ "-fsection-anchors");
flag_section_anchors = 0;
}
@@ -1250,14 +1253,16 @@ process_options (void)
{
if (targetm.chkp_bound_mode () == VOIDmode)
{
- error ("-fcheck-pointer-bounds is not supported for this target");
+ error_at (UNKNOWN_LOCATION,
+ "-fcheck-pointer-bounds is not supported for this target");
flag_check_pointer_bounds = 0;
}
if (flag_sanitize & SANITIZE_ADDRESS)
{
- error ("-fcheck-pointer-bounds is not supported with "
- "Address Sanitizer");
+ error_at (UNKNOWN_LOCATION,
+ "-fcheck-pointer-bounds is not supported with "
+ "Address Sanitizer");
flag_check_pointer_bounds = 0;
}
}
@@ -1270,7 +1275,8 @@ process_options (void)
if (!abi_version_at_least (2))
{
/* -fabi-version=1 support was removed after GCC 4.9. */
- error ("%<-fabi-version=1%> is no longer supported");
+ error_at (UNKNOWN_LOCATION,
+ "%<-fabi-version=1%> is no longer supported");
flag_abi_version = 2;
}
@@ -1297,10 +1303,12 @@ process_options (void)
/* Warn about options that are not supported on this machine. */
#ifndef INSN_SCHEDULING
if (flag_schedule_insns || flag_schedule_insns_after_reload)
- warning (0, "instruction scheduling not supported on this target machine");
+ warning_at (UNKNOWN_LOCATION, 0,
+ "instruction scheduling not supported on this target machine");
#endif
if (!DELAY_SLOTS && flag_delayed_branch)
- warning (0, "this target machine does not have delayed branches");
+ warning_at (UNKNOWN_LOCATION, 0,
+ "this target machine does not have delayed branches");
user_label_prefix = USER_LABEL_PREFIX;
if (flag_leading_underscore != -1)
@@ -1313,8 +1321,9 @@ process_options (void)
user_label_prefix = flag_leading_underscore ? "_" : "";
}
else
- warning (0, "-f%sleading-underscore not supported on this target machine",
- flag_leading_underscore ? "" : "no-");
+ warning_at (UNKNOWN_LOCATION, 0,
+ "-f%sleading-underscore not supported on this "
+ "target machine", flag_leading_underscore ? "" : "no-");
}
/* If we are in verbose mode, write out the version and maybe all the
@@ -1350,14 +1359,16 @@ process_options (void)
FILE *final_output = fopen (flag_dump_final_insns, "w");
if (!final_output)
{
- error ("could not open final insn dump file %qs: %m",
- flag_dump_final_insns);
+ error_at (UNKNOWN_LOCATION,
+ "could not open final insn dump file %qs: %m",
+ flag_dump_final_insns);
flag_dump_final_insns = NULL;
}
else if (fclose (final_output))
{
- error ("could not close zeroed insn dump file %qs: %m",
- flag_dump_final_insns);
+ error_at (UNKNOWN_LOCATION,
+ "could not close zeroed insn dump file %qs: %m",
+ flag_dump_final_insns);
flag_dump_final_insns = NULL;
}
}
@@ -1392,8 +1403,9 @@ process_options (void)
debug_hooks = &dwarf2_lineno_debug_hooks;
#endif
else
- error ("target system does not support the %qs debug format",
- debug_type_names[write_symbols]);
+ error_at (UNKNOWN_LOCATION,
+ "target system does not support the %qs debug format",
+ debug_type_names[write_symbols]);
/* We know which debug output will be used so we can set flag_var_tracking
and flag_var_tracking_uninit if the user has not specified them. */
@@ -1404,11 +1416,13 @@ process_options (void)
|| flag_var_tracking_uninit == 1)
{
if (debug_info_level < DINFO_LEVEL_NORMAL)
- warning (0, "variable tracking requested, but useless unless "
- "producing debug info");
+ warning_at (UNKNOWN_LOCATION, 0,
+ "variable tracking requested, but useless unless "
+ "producing debug info");
else
- warning (0, "variable tracking requested, but not supported "
- "by this debug format");
+ warning_at (UNKNOWN_LOCATION, 0,
+ "variable tracking requested, but not supported "
+ "by this debug format");
}
flag_var_tracking = 0;
flag_var_tracking_uninit = 0;
@@ -1444,7 +1458,8 @@ process_options (void)
if (flag_var_tracking_assignments
&& (flag_selective_scheduling || flag_selective_scheduling2))
- warning (0, "var-tracking-assignments changes selective scheduling");
+ warning_at (UNKNOWN_LOCATION, 0,
+ "var-tracking-assignments changes selective scheduling");
if (flag_tree_cselim == AUTODETECT_VALUE)
{
@@ -1461,31 +1476,37 @@ process_options (void)
{
aux_info_file = fopen (aux_info_file_name, "w");
if (aux_info_file == 0)
- fatal_error (input_location, "can%'t open %s: %m", aux_info_file_name);
+ fatal_error (UNKNOWN_LOCATION,
+ "can%'t open %s: %m", aux_info_file_name);
}
if (!targetm_common.have_named_sections)
{
if (flag_function_sections)
{
- warning (0, "-ffunction-sections not supported for this target");
+ warning_at (UNKNOWN_LOCATION, 0,
+ "-ffunction-sections not supported for this target");
flag_function_sections = 0;
}
if (flag_data_sections)
{
- warning (0, "-fdata-sections not supported for this target");
+ warning_at (UNKNOWN_LOCATION, 0,
+ "-fdata-sections not supported for this target");
flag_data_sections = 0;
}
}
if (flag_prefetch_loop_arrays > 0 && !targetm.code_for_prefetch)
{
- warning (0, "-fprefetch-loop-arrays not supported for this target");
+ warning_at (UNKNOWN_LOCATION, 0,
+ "-fprefetch-loop-arrays not supported for this target");
flag_prefetch_loop_arrays = 0;
}
else if (flag_prefetch_loop_arrays > 0 && !targetm.have_prefetch ())
{
- warning (0, "-fprefetch-loop-arrays not supported for this target (try -march switches)");
+ warning_at (UNKNOWN_LOCATION, 0,
+ "-fprefetch-loop-arrays not supported for this target "
+ "(try -march switches)");
flag_prefetch_loop_arrays = 0;
}
@@ -1493,7 +1514,8 @@ process_options (void)
make much sense anyway, so don't allow it. */
if (flag_prefetch_loop_arrays > 0 && optimize_size)
{
- warning (0, "-fprefetch-loop-arrays is not supported with -Os");
+ warning_at (UNKNOWN_LOCATION, 0,
+ "-fprefetch-loop-arrays is not supported with -Os");
flag_prefetch_loop_arrays = 0;
}
@@ -1504,7 +1526,9 @@ process_options (void)
/* We cannot reassociate if we want traps or signed zeros. */
if (flag_associative_math && (flag_trapping_math || flag_signed_zeros))
{
- warning (0, "-fassociative-math disabled; other options take precedence");
+ warning_at (UNKNOWN_LOCATION, 0,
+ "-fassociative-math disabled; other options take "
+ "precedence");
flag_associative_math = 0;
}
@@ -1520,7 +1544,8 @@ process_options (void)
target already uses a soft frame pointer, the transition is trivial. */
if (!FRAME_GROWS_DOWNWARD && flag_stack_protect)
{
- warning (0, "-fstack-protector not supported for this target");
+ warning_at (UNKNOWN_LOCATION, 0,
+ "-fstack-protector not supported for this target");
flag_stack_protect = 0;
}
if (!flag_stack_protect)
@@ -1531,16 +1556,17 @@ process_options (void)
if ((flag_sanitize & SANITIZE_ADDRESS)
&& !FRAME_GROWS_DOWNWARD)
{
- warning (0,
- "-fsanitize=address and -fsanitize=kernel-address "
- "are not supported for this target");
+ warning_at (UNKNOWN_LOCATION, 0,
+ "-fsanitize=address and -fsanitize=kernel-address "
+ "are not supported for this target");
flag_sanitize &= ~SANITIZE_ADDRESS;
}
if ((flag_sanitize & SANITIZE_USER_ADDRESS)
&& targetm.asan_shadow_offset == NULL)
{
- warning (0, "-fsanitize=address not supported for this target");
+ warning_at (UNKNOWN_LOCATION, 0,
+ "-fsanitize=address not supported for this target");
flag_sanitize &= ~SANITIZE_ADDRESS;
}