PR c++/68795: fix uninitialized close_paren_loc in cp_parser_postfix_expression
[gcc.git] / gcc / gimple-low.c
index 1e17c2b262f8bd29aac7fa1a53c6ed8c22b6a68a..f9b0fba2688b3aa0b53839a7ce73214c1e88b18d 100644 (file)
@@ -1,6 +1,6 @@
 /* GIMPLE lowering pass.  Converts High GIMPLE into Low GIMPLE.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2016 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -21,33 +21,15 @@ along with GCC; see the file COPYING3.  If not see
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
+#include "backend.h"
 #include "tree.h"
+#include "gimple.h"
+#include "tree-pass.h"
+#include "fold-const.h"
 #include "tree-nested.h"
 #include "calls.h"
-#include "predict.h"
-#include "vec.h"
-#include "hashtab.h"
-#include "hash-set.h"
-#include "machmode.h"
-#include "hard-reg-set.h"
-#include "input.h"
-#include "function.h"
-#include "basic-block.h"
-#include "tree-ssa-alias.h"
-#include "internal-fn.h"
-#include "gimple-expr.h"
-#include "is-a.h"
-#include "gimple.h"
 #include "gimple-iterator.h"
-#include "tree-iterator.h"
-#include "tree-inline.h"
-#include "flags.h"
-#include "diagnostic-core.h"
-#include "tree-pass.h"
-#include "langhooks.h"
 #include "gimple-low.h"
-#include "tree-nested.h"
 
 /* The differences between High GIMPLE and Low GIMPLE are the
    following:
@@ -103,8 +85,8 @@ lower_function_body (void)
   gimple_seq body = gimple_body (current_function_decl);
   gimple_seq lowered_body;
   gimple_stmt_iterator i;
-  gimple bind;
-  gimple x;
+  gimple *bind;
+  gimple *x;
 
   /* The gimplifier should've left a body of exactly one statement,
      namely a GIMPLE_BIND.  */
@@ -228,7 +210,7 @@ lower_sequence (gimple_seq *seq, struct lower_data *data)
 static void
 lower_omp_directive (gimple_stmt_iterator *gsi, struct lower_data *data)
 {
-  gimple stmt;
+  gimple *stmt;
 
   stmt = gsi_stmt (*gsi);
 
@@ -249,7 +231,7 @@ lower_omp_directive (gimple_stmt_iterator *gsi, struct lower_data *data)
 static void
 lower_stmt (gimple_stmt_iterator *gsi, struct lower_data *data)
 {
-  gimple stmt = gsi_stmt (*gsi);
+  gimple *stmt = gsi_stmt (*gsi);
 
   gimple_set_block (stmt, data->block);
 
@@ -355,7 +337,8 @@ lower_stmt (gimple_stmt_iterator *gsi, struct lower_data *data)
                return;
              }
            else if (DECL_FUNCTION_CODE (decl) == BUILT_IN_POSIX_MEMALIGN
-                    && flag_tree_bit_ccp)
+                    && flag_tree_bit_ccp
+                    && gimple_builtin_call_types_compatible_p (stmt, decl))
              {
                lower_builtin_posix_memalign (gsi);
                return;
@@ -454,7 +437,7 @@ static void
 lower_try_catch (gimple_stmt_iterator *gsi, struct lower_data *data)
 {
   bool cannot_fallthru;
-  gimple stmt = gsi_stmt (*gsi);
+  gimple *stmt = gsi_stmt (*gsi);
   gimple_stmt_iterator i;
 
   /* We don't handle GIMPLE_TRY_FINALLY.  */
@@ -572,7 +555,7 @@ gimple_try_catch_may_fallthru (gtry *stmt)
    we'll just delete the extra code later.  */
 
 bool
-gimple_stmt_may_fallthru (gimple stmt)
+gimple_stmt_may_fallthru (gimple *stmt)
 {
   if (!stmt)
     return true;
@@ -649,7 +632,7 @@ static void
 lower_gimple_return (gimple_stmt_iterator *gsi, struct lower_data *data)
 {
   greturn *stmt = as_a <greturn *> (gsi_stmt (*gsi));
-  gimple t;
+  gimple *t;
   int i;
   return_statements_t tmp_rs;
 
@@ -739,12 +722,12 @@ lower_gimple_return (gimple_stmt_iterator *gsi, struct lower_data *data)
 static void
 lower_builtin_setjmp (gimple_stmt_iterator *gsi)
 {
-  gimple stmt = gsi_stmt (*gsi);
+  gimple *stmt = gsi_stmt (*gsi);
   location_t loc = gimple_location (stmt);
   tree cont_label = create_artificial_label (loc);
   tree next_label = create_artificial_label (loc);
   tree dest, t, arg;
-  gimple g;
+  gimple *g;
 
   /* __builtin_setjmp_{setup,receiver} aren't ECF_RETURNS_TWICE and for RTL
      these builtins are modelled as non-local label jumps to the label
@@ -759,7 +742,7 @@ lower_builtin_setjmp (gimple_stmt_iterator *gsi)
   dest = gimple_call_lhs (stmt);
 
   /* Build '__builtin_setjmp_setup (BUF, NEXT_LABEL)' and insert.  */
-  arg = build_addr (next_label, current_function_decl);
+  arg = build_addr (next_label);
   t = builtin_decl_implicit (BUILT_IN_SETJMP_SETUP);
   g = gimple_build_call (t, 2, gimple_call_arg (stmt, 0), arg);
   gimple_set_location (g, loc);
@@ -784,7 +767,7 @@ lower_builtin_setjmp (gimple_stmt_iterator *gsi)
   gsi_insert_before (gsi, g, GSI_SAME_STMT);
 
   /* Build '__builtin_setjmp_receiver (NEXT_LABEL)' and insert.  */
-  arg = build_addr (next_label, current_function_decl);
+  arg = build_addr (next_label);
   t = builtin_decl_implicit (BUILT_IN_SETJMP_RECEIVER);
   g = gimple_build_call (t, 1, arg);
   gimple_set_location (g, loc);
@@ -824,7 +807,7 @@ lower_builtin_setjmp (gimple_stmt_iterator *gsi)
 static void
 lower_builtin_posix_memalign (gimple_stmt_iterator *gsi)
 {
-  gimple stmt, call = gsi_stmt (*gsi);
+  gimple *stmt, *call = gsi_stmt (*gsi);
   tree pptr = gimple_call_arg (call, 0);
   tree align = gimple_call_arg (call, 1);
   tree res = gimple_call_lhs (call);
@@ -847,7 +830,7 @@ lower_builtin_posix_memalign (gimple_stmt_iterator *gsi)
     }
   tree align_label = create_artificial_label (UNKNOWN_LOCATION);
   tree noalign_label = create_artificial_label (UNKNOWN_LOCATION);
-  gimple cond = gimple_build_cond (EQ_EXPR, res, integer_zero_node,
+  gimple *cond = gimple_build_cond (EQ_EXPR, res, integer_zero_node,
                                   align_label, noalign_label);
   gsi_insert_after (gsi, cond, GSI_NEW_STMT);
   gsi_insert_after (gsi, gimple_build_label (align_label), GSI_NEW_STMT);