Commit 22fba4a3 authored by Jeff Chapman II's avatar Jeff Chapman II

update to current svn

parent 8c6ce362
2018-09-04 Xuepeng Guo <xuepeng.guo@intel.com>
* MAINTAINERS: Update my email address.
2018-08-29 Vlad Lazar <vlad.lazar@arm.com>
* MAINTAINERS (write after approval): Add myself.
2018-08-21 Richard Sandiford <richard.sandiford@arm.com>
* MAINTAINERS: Add self to global reviewers list.
......@@ -9,7 +17,7 @@
2018-08-10 Martin Liska <mliska@suse.cz>
* MAINTAINERS: Revert change in previous commit and
join lines.
join lines.
2018-08-10 Martin Liska <mliska@suse.cz>
......@@ -51,7 +59,7 @@
2018-06-19 Bernhard M. Wiedemann <bwiedemann@suse.de>
* libtool.m4: Sort output of 'find' to enable deterministic builds.
* libtool.m4: Sort output of 'find' to enable deterministic builds.
* ltmain.sh: Likewise.
2018-07-03 Segher Boessenkool <segher@kernel.crashing.org>
......
......@@ -395,7 +395,7 @@ Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
Yury Gribov <tetra2005@gmail.com>
Jon Grimm <jgrimm2@us.ibm.com>
Laurent Guerby <laurent@guerby.net>
Xuepeng Guo <terry.guo@arm.com>
Xuepeng Guo <terry.xpguo@gmail.com>
Wei Guozhi <carrot@google.com>
Mostafa Hagog <hagog@gcc.gnu.org>
Andrew Haley <aph@redhat.com>
......@@ -459,6 +459,7 @@ Terry Laurenzo <tlaurenzo@gmail.com>
Alan Lawrence <alan.lawrence@arm.com>
Jozef Lawrynowicz <jozef.l@mittosystems.com>
Georg-Johann Lay <avr@gjlay.de>
Vlad Lazar <vlad.lazar@arm.com>
Marc Lehmann <pcg@goof.com>
James Lemke <jim@lemke.org>
Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
......
......@@ -14,7 +14,7 @@
2018-05-09 Joshua Watt <jpewhacker@gmail.com>
* ax_pthread.m4: Add file.
* ax_pthread.m4: Add file.
2018-05-08 Richard Biener <rguenther@suse.de>
......@@ -451,7 +451,7 @@
* config/mh-interix: Remove as unneeded.
* config/picflag.m4 (i[[34567]]86-*-interix3*):
Change triplet to i[[34567]]86-*-interix[[3-9]]*.
Change triplet to i[[34567]]86-*-interix[[3-9]]*.
2012-01-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
......
......@@ -73,7 +73,7 @@
* update-copyright.py: Skip pdt-5.f03 in gfortran.dg subdir.
2017-11-28 Julia Koval <julia.koval@intel.com>
Sebastian Peryt <sebastian.peryt@intel.com>
Sebastian Peryt <sebastian.peryt@intel.com>
* contrib/gcc_update: Ditto.
......@@ -183,8 +183,8 @@
2017-04-11 Damian Rouson <damian@sourceryinstitute.org>
* download_prerequisites (md5_check): New function emulates Linux
'md5 --check' on macOS. Modified script for macOS compatibility.
* download_prerequisites (md5_check): New function emulates Linux
'md5 --check' on macOS. Modified script for macOS compatibility.
2017-02-06 Palmer Dabbelt <palmer@dabbelt.com>
......@@ -283,7 +283,7 @@
2016-09-20 Christophe Lyon <christophe.lyon@linaro.org>
* compare_tests: Take ERROR messages into account when
comparing.
comparing.
2016-08-17 Martin Liska <mliska@suse.cz>
......
2018-09-03 Rasmus Villemoes <rv@rasmusvillemoes.dk>
* inclhack.def (vxworks_ioctl_macro): Remove parentheses from
expansion of ioctl macro.
* fixincl.x: Regenerate.
2018-07-23 David Edelsohn <dje.gcc@gmail.com>
* inclhack.def (aix_unistd): New.
......@@ -1256,7 +1262,7 @@
* tests/base/math.h: Update.
2007-01-05 Bruce Korb <bkorb@gnu.org>,
Daniel Franke <franke.daniel@gmail.com>
Daniel Franke <franke.daniel@gmail.com>
PR target/30008
* fixincl.tpl (List): separate file name patterns with a NUL byte instead
......@@ -1472,7 +1478,7 @@
* fixincl.c: Don't include <sys/wait.h> if SEPARATE_FIX_PROC.
2005-05-19 Eric Botcazou <ebotcazou@libertysurf.fr>
Joseph S. Myers <joseph@codesourcery.com>
Joseph S. Myers <joseph@codesourcery.com>
PR target/19933
PR target/21315
......
......@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
* It has been AutoGen-ed July 23, 2018 at 07:27:34 PM by AutoGen 5.18
* It has been AutoGen-ed September 3, 2018 at 03:24:05 PM by AutoGen 5.18.7
* From the definitions inclhack.def
* and the template file fixincl
*/
/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Jul 23 19:27:34 UTC 2018
/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Sep 3 15:24:05 CEST 2018
*
* You must regenerate it. Use the ./genfixes script.
*
......@@ -9737,7 +9737,7 @@ tSCC* apzVxworks_Ioctl_MacroMachs[] = {
static const char* apzVxworks_Ioctl_MacroPatch[] = {
"format",
"%0\n\
#define ioctl(fd, func, arg) (ioctl)(fd, func, (int)(arg))\n",
#define ioctl(fd, func, arg) ioctl(fd, func, (int)(arg))\n",
"extern[\t ]+int[\t ]+ioctl[\t ]*\\([\t ,[:alnum:]]*\\);",
(char*)NULL };
......
......@@ -4916,7 +4916,7 @@ fix = {
c_fix = format;
c_fix_arg = "%0\n"
"#define ioctl(fd, func, arg) (ioctl)(fd, func, (int)(arg))\n";
"#define ioctl(fd, func, arg) ioctl(fd, func, (int)(arg))\n";
c_fix_arg = "extern[\t ]+int[\t ]+ioctl[\t ]*\\([\t ,[:alnum:]]*\\);";
test_text = "extern int ioctl ( int asdf1234, int jkl , int qwerty ) ;";
......
This diff is collapsed.
2018-08-27 Martin Liska <mliska@suse.cz>
* gcc-interface/decl.c (update_profile): Use new function
fndecl_built_in_p and remove check for FUNCTION_DECL if
possible.
* gcc-interface/gigi.h (call_is_atomic_load): Likewise.
* gcc-interface/utils.c (gnat_pushdecl): Likewise.
2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
* exp_unst.ads: Fix typo 'exapnded' to 'expanded'.
......@@ -288,7 +296,7 @@
* gcc-interface/Makefile.in (xoscons): Likewise.
2018-07-31 Alexandre Oliva <oliva@adacore.com>
Olivier Hainque <hainque@adacore.com>
Olivier Hainque <hainque@adacore.com>
* gcc-interface/trans.c: Include debug.h.
(file_map): New static variable.
......
......@@ -5421,7 +5421,7 @@ update_profile (Entity_Id gnat_subprog)
if (DECL_P (gnu_type))
{
/* Builtins cannot have their address taken so we can reset them. */
gcc_assert (DECL_BUILT_IN (gnu_type));
gcc_assert (fndecl_built_in_p (gnu_type));
save_gnu_tree (gnat_subprog, NULL_TREE, false);
save_gnu_tree (gnat_subprog, gnu_type, false);
return;
......
......@@ -1081,7 +1081,7 @@ call_is_atomic_load (tree exp)
{
tree fndecl = get_callee_fndecl (exp);
if (!(fndecl && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL))
if (!(fndecl && fndecl_built_in_p (fndecl, BUILT_IN_NORMAL)))
return false;
enum built_in_function code = DECL_FUNCTION_CODE (fndecl);
......
......@@ -773,7 +773,7 @@ gnat_pushdecl (tree decl, Node_Id gnat_node)
debugger at the proper time. */
if (DECL_EXTERNAL (decl)
&& TREE_CODE (decl) == FUNCTION_DECL
&& DECL_BUILT_IN (decl))
&& fndecl_built_in_p (decl))
vec_safe_push (builtin_decls, decl);
else if (global_bindings_p ())
vec_safe_push (global_decls, decl);
......
......@@ -432,7 +432,7 @@ diag_attr_exclusions (tree last_decl, tree node, tree attrname,
bool note = last_decl != NULL_TREE;
auto_diagnostic_group d;
if (TREE_CODE (node) == FUNCTION_DECL
&& DECL_BUILT_IN (node))
&& fndecl_built_in_p (node))
note &= warning (OPT_Wattributes,
"ignoring attribute %qE in declaration of "
"a built-in function %qD because it conflicts "
......
......@@ -91,7 +91,6 @@
*/
#include "config.h"
#define INCLUDE_ALGORITHM /* stable_sort */
#include "system.h"
#include "coretypes.h"
#include "backend.h"
......@@ -2351,13 +2350,20 @@ reorder_basic_blocks_software_trace_cache (void)
FREE (bbd);
}
/* Return true if edge E1 is more desirable as a fallthrough edge than
edge E2 is. */
/* Order edges by execution frequency, higher first. */
static bool
edge_order (edge e1, edge e2)
static int
edge_order (const void *ve1, const void *ve2)
{
return e1->count () > e2->count ();
edge e1 = *(const edge *) ve1;
edge e2 = *(const edge *) ve2;
profile_count c1 = e1->count ();
profile_count c2 = e2->count ();
/* Since profile_count::operator< does not establish a strict weak order
in presence of uninitialized counts, use 'max': this makes them appear
as if having execution frequency less than any initialized count. */
profile_count m = c1.max (c2);
return (m == c2) - (m == c1);
}
/* Reorder basic blocks using the "simple" algorithm. This tries to
......@@ -2410,7 +2416,7 @@ reorder_basic_blocks_simple (void)
all edges are equally desirable. */
if (optimize_function_for_speed_p (cfun))
std::stable_sort (edges, edges + n, edge_order);
gcc_stablesort (edges, n, sizeof *edges, edge_order);
/* Now decide which of those edges to make fallthrough edges. We set
BB_VISITED if a block already has a fallthrough successor assigned
......
......@@ -208,15 +208,6 @@ is_builtin_name (const char *name)
return false;
}
/* Return true if DECL is a function symbol representing a built-in. */
bool
is_builtin_fn (tree decl)
{
return TREE_CODE (decl) == FUNCTION_DECL && DECL_BUILT_IN (decl);
}
/* Return true if NODE should be considered for inline expansion regardless
of the optimization level. This means whenever a function is invoked with
its "internal" name, which normally contains the prefix "__builtin". */
......@@ -576,7 +567,7 @@ string_length (const void *ptr, unsigned eltsize, unsigned maxelts)
tree
c_strlen (tree src, int only_value, unsigned eltsize)
{
gcc_assert (eltsize == 1 || eltsize == 2 || eltsize == 4);
gcc_checking_assert (eltsize == 1 || eltsize == 2 || eltsize == 4);
STRIP_NOPS (src);
if (TREE_CODE (src) == COND_EXPR
&& (only_value || !TREE_SIDE_EFFECTS (TREE_OPERAND (src, 0))))
......@@ -598,7 +589,7 @@ c_strlen (tree src, int only_value, unsigned eltsize)
/* Offset from the beginning of the string in bytes. */
tree byteoff;
tree memsize;
src = string_constant (src, &byteoff, &memsize);
src = string_constant (src, &byteoff, &memsize, NULL);
if (src == 0)
return NULL_TREE;
......@@ -665,10 +656,10 @@ c_strlen (tree src, int only_value, unsigned eltsize)
a null character if we can represent it as a single HOST_WIDE_INT. */
if (byteoff == 0)
eltoff = 0;
else if (! tree_fits_shwi_p (byteoff))
else if (! tree_fits_uhwi_p (byteoff) || tree_to_uhwi (byteoff) % eltsize)
eltoff = -1;
else
eltoff = tree_to_shwi (byteoff) / eltsize;
eltoff = tree_to_uhwi (byteoff) / eltsize;
/* If the offset is known to be out of bounds, warn, and call strlen at
runtime. */
......@@ -700,6 +691,11 @@ c_strlen (tree src, int only_value, unsigned eltsize)
unsigned len = string_length (ptr + eltoff * eltsize, eltsize,
strelts - eltoff);
/* Don't know what to return if there was no zero termination.
Ideally this would turn into a gcc_checking_assert over time. */
if (len > maxelts - eltoff)
return NULL_TREE;
return ssize_int (len);
}
......@@ -2979,6 +2975,10 @@ expand_builtin_strnlen (tree exp, rtx target, machine_mode target_mode)
tree func = get_callee_fndecl (exp);
tree len = c_strlen (src, 0);
/* FIXME: Change c_strlen() to return sizetype instead of ssizetype
so these conversions aren't necessary. */
if (len)
len = fold_convert_loc (loc, TREE_TYPE (bound), len);
if (TREE_CODE (bound) == INTEGER_CST)
{
......@@ -2993,7 +2993,6 @@ expand_builtin_strnlen (tree exp, rtx target, machine_mode target_mode)
if (!len || TREE_CODE (len) != INTEGER_CST)
return NULL_RTX;
len = fold_convert_loc (loc, size_type_node, len);
len = fold_build2_loc (loc, MIN_EXPR, size_type_node, len, bound);
return expand_expr (len, target, target_mode, EXPAND_NORMAL);
}
......@@ -8154,11 +8153,8 @@ builtin_mathfn_code (const_tree t)
return END_BUILTINS;
fndecl = get_callee_fndecl (t);
if (fndecl == NULL_TREE
|| TREE_CODE (fndecl) != FUNCTION_DECL
|| ! DECL_BUILT_IN (fndecl)
|| DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_MD)
return END_BUILTINS;
if (fndecl == NULL_TREE || !fndecl_built_in_p (fndecl, BUILT_IN_NORMAL))
return END_BUILTINS;
parmlist = TYPE_ARG_TYPES (TREE_TYPE (fndecl));
init_const_call_expr_arg_iterator (t, &iter);
......@@ -8313,9 +8309,8 @@ fold_builtin_expect (location_t loc, tree arg0, tree arg1, tree arg2,
if (TREE_CODE (inner) == CALL_EXPR
&& (fndecl = get_callee_fndecl (inner))
&& (DECL_BUILT_IN_P (fndecl, BUILT_IN_NORMAL, BUILT_IN_EXPECT)
|| DECL_BUILT_IN_P (fndecl, BUILT_IN_NORMAL,
BUILT_IN_EXPECT_WITH_PROBABILITY)))
&& (fndecl_built_in_p (fndecl, BUILT_IN_EXPECT)
|| fndecl_built_in_p (fndecl, BUILT_IN_EXPECT_WITH_PROBABILITY)))
return arg0;
inner = inner_arg0;
......@@ -9628,9 +9623,7 @@ fold_call_expr (location_t loc, tree exp, bool ignore)
{
tree ret = NULL_TREE;
tree fndecl = get_callee_fndecl (exp);
if (fndecl
&& TREE_CODE (fndecl) == FUNCTION_DECL
&& DECL_BUILT_IN (fndecl)
if (fndecl && fndecl_built_in_p (fndecl)
/* If CALL_EXPR_VA_ARG_PACK is set, the arguments aren't finalized
yet. Defer folding until we see all the arguments
(after inlining). */
......@@ -9644,10 +9637,7 @@ fold_call_expr (location_t loc, tree exp, bool ignore)
if (nargs && TREE_CODE (CALL_EXPR_ARG (exp, nargs - 1)) == CALL_EXPR)
{
tree fndecl2 = get_callee_fndecl (CALL_EXPR_ARG (exp, nargs - 1));
if (fndecl2
&& TREE_CODE (fndecl2) == FUNCTION_DECL
&& DECL_BUILT_IN_CLASS (fndecl2) == BUILT_IN_NORMAL
&& DECL_FUNCTION_CODE (fndecl2) == BUILT_IN_VA_ARG_PACK)
if (fndecl2 && fndecl_built_in_p (fndecl2, BUILT_IN_VA_ARG_PACK))
return NULL_TREE;
}
......@@ -9683,17 +9673,14 @@ fold_builtin_call_array (location_t loc, tree,
tree fndecl = TREE_OPERAND (fn, 0);
if (TREE_CODE (fndecl) == FUNCTION_DECL
&& DECL_BUILT_IN (fndecl))
&& fndecl_built_in_p (fndecl))
{
/* If last argument is __builtin_va_arg_pack (), arguments to this
function are not finalized yet. Defer folding until they are. */
if (n && TREE_CODE (argarray[n - 1]) == CALL_EXPR)
{
tree fndecl2 = get_callee_fndecl (argarray[n - 1]);
if (fndecl2
&& TREE_CODE (fndecl2) == FUNCTION_DECL
&& DECL_BUILT_IN_CLASS (fndecl2) == BUILT_IN_NORMAL
&& DECL_FUNCTION_CODE (fndecl2) == BUILT_IN_VA_ARG_PACK)
if (fndecl2 && fndecl_built_in_p (fndecl2, BUILT_IN_VA_ARG_PACK))
return NULL_TREE;
}
if (avoid_folding_inline_builtin (fndecl))
......@@ -10812,9 +10799,7 @@ fold_call_stmt (gcall *stmt, bool ignore)
tree ret = NULL_TREE;
tree fndecl = gimple_call_fndecl (stmt);
location_t loc = gimple_location (stmt);
if (fndecl
&& TREE_CODE (fndecl) == FUNCTION_DECL
&& DECL_BUILT_IN (fndecl)
if (fndecl && fndecl_built_in_p (fndecl)
&& !gimple_call_va_arg_pack_p (stmt))
{
int nargs = gimple_call_num_args (stmt);
......@@ -10861,8 +10846,7 @@ fold_call_stmt (gcall *stmt, bool ignore)
void
set_builtin_user_assembler_name (tree decl, const char *asmspec)
{
gcc_assert (TREE_CODE (decl) == FUNCTION_DECL
&& DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL
gcc_assert (fndecl_built_in_p (decl, BUILT_IN_NORMAL)
&& asmspec != 0);
tree builtin = builtin_decl_explicit (DECL_FUNCTION_CODE (decl));
......@@ -10882,7 +10866,7 @@ set_builtin_user_assembler_name (tree decl, const char *asmspec)
bool
is_simple_builtin (tree decl)
{
if (decl && DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL)
if (decl && fndecl_built_in_p (decl, BUILT_IN_NORMAL))
switch (DECL_FUNCTION_CODE (decl))
{
/* Builtins that expand to constants. */
......
......@@ -49,7 +49,6 @@ extern struct target_builtins *this_target_builtins;
/* Non-zero if __builtin_constant_p should be folded right away. */
extern bool force_folding_builtin_constant_p;
extern bool is_builtin_fn (tree);
extern bool called_as_built_in (tree);
extern bool get_object_alignment_1 (tree, unsigned int *,
unsigned HOST_WIDE_INT *);
......
2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (complete_flexible_array_elts): New helper function.
* c-common.h (complete_flexible_array_elts): Declare.
2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (braced_list_to_string): Remove eval parameter.
Add some more checks. Always create zero-terminated STRING_CST.
* c-common.h (braced_list_to_string): Adjust prototype.
2018-08-27 David Malcolm <dmalcolm@redhat.com>
PR 87091
* c-common.c (c_cpp_error): Update for conversion of show_caret_p
to a tri-state.
(maybe_suggest_missing_token_insertion): Likewise.
(maybe_add_include_fixit): Add param "override_location". If set,
and source-printing is enabled, then override the rich_location's
primary location with that of the insertion point for the fix-it
hint, marking it with SHOW_LINES_WITHOUT_RANGE.
* c-common.h (extern void maybe_add_include_fixit): Add bool
param.
* c-format.c (selftest::test_type_mismatch_range_labels): Update
for conversion of show_caret_p to a tri-state.
* c-warn.c (warn_for_restrict): Likewise.
* known-headers.cc
(suggest_missing_header::~suggest_missing_header): Update call to
maybe_add_include_fixit to suggest overriding the location, as it
is for a note.
2018-08-27 Martin Liska <mliska@suse.cz>
* c-common.c (check_function_restrict): Use new function
fndecl_built_in_p and remove check for FUNCTION_DECL if
possible.
(check_builtin_function_arguments): Likewise.
(reject_gcc_builtin): Likewise.
* c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
2018-08-26 Marek Polacek <polacek@redhat.com>
PR c++/87029, Implement -Wredundant-move.
* c.opt (Wredundant-move): New option.
2018-08-21 Marek Polacek <polacek@redhat.com>
PR c++/86981, Implement -Wpessimizing-move.
......@@ -51,8 +96,8 @@
2018-08-17 Martin Liska <mliska@suse.cz>
* c.opt: Remove Warn, Init and Report for options with
Ignore/Deprecated flag. Warning is done automatically for
Deprecated flags.
Ignore/Deprecated flag. Warning is done automatically for
Deprecated flags.
2018-08-16 David Malcolm <dmalcolm@redhat.com>
......@@ -365,7 +410,7 @@
2018-05-11 Martin Liska <mliska@suse.cz>