aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/dwarf2out.cc2
-rw-r--r--gcc/gimple.h3
-rw-r--r--gcc/optabs.cc6
-rw-r--r--gcc/testsuite/c-c++-common/nonnull-1.c2
4 files changed, 6 insertions, 7 deletions
diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index 29f32ec..b468a4b 100644
--- a/gcc/dwarf2out.cc
+++ b/gcc/dwarf2out.cc
@@ -12916,7 +12916,7 @@ output_one_line_info_table (dw_line_info_table *table)
char line_label[MAX_ARTIFICIAL_LABEL_BYTES];
unsigned int current_line = 1;
bool current_is_stmt = DWARF_LINE_DEFAULT_IS_STMT_START;
- dw_line_info_entry *ent, *prev_addr;
+ dw_line_info_entry *ent, *prev_addr = NULL;
size_t i;
unsigned int view;
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 6b1e89a..870629c 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -1913,7 +1913,8 @@ static inline void
gimple_set_location (gimple *g, location_t location)
{
/* Copy the no-warning data to the statement location. */
- copy_warning (location, g->location);
+ if (g->location != UNKNOWN_LOCATION)
+ copy_warning (location, g->location);
g->location = location;
}
diff --git a/gcc/optabs.cc b/gcc/optabs.cc
index c0a6847..a50dd79 100644
--- a/gcc/optabs.cc
+++ b/gcc/optabs.cc
@@ -264,10 +264,8 @@ expand_widen_pattern_expr (sepops ops, rtx op0, rtx op1, rtx wide_op,
bool sbool = false;
oprnd0 = ops->op0;
- if (nops >= 2)
- oprnd1 = ops->op1;
- if (nops >= 3)
- oprnd2 = ops->op2;
+ oprnd1 = nops >= 2 ? ops->op1 : NULL_TREE;
+ oprnd2 = nops >= 3 ? ops->op2 : NULL_TREE;
tmode0 = TYPE_MODE (TREE_TYPE (oprnd0));
if (ops->code == VEC_UNPACK_FIX_TRUNC_HI_EXPR
diff --git a/gcc/testsuite/c-c++-common/nonnull-1.c b/gcc/testsuite/c-c++-common/nonnull-1.c
index ea98736..7be4e34 100644
--- a/gcc/testsuite/c-c++-common/nonnull-1.c
+++ b/gcc/testsuite/c-c++-common/nonnull-1.c
@@ -30,5 +30,5 @@ func (char *cp1, char *cp2, char *cp3, char *cp4)
__attribute__((nonnull (1))) int
func2 (char *cp)
{
- return (cp != NULL) ? 1 : 0; /* { dg-warning "'nonnull' argument" "cp compared to NULL" { xfail c++ } } */
+ return (cp != NULL) ? 1 : 0; /* { dg-warning "'nonnull' argument" "cp compared to NULL" } */
}