Skip to content

Commit cada00d

Browse files
author
Damian Rouson
committed
Merge branch 'master' of https://github.com/gcc-mirror/gcc
2 parents f1f7135 + e62ffc1 commit cada00d

34 files changed

+535
-161
lines changed

gcc/ChangeLog

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
2017-11-19 Jeff Law <[email protected]>
2+
3+
* tree-ssa-dom.c (record_equivalences_from_phis): Fix handling
4+
of degenerates resulting from ignoring an edge.
5+
6+
2017-11-19 Jan Hubicka <[email protected]>
7+
8+
PR ipa/81360
9+
* ipa-inline.c (can_inline_edge_p): Also check that caller is optimized
10+
11+
2017-11-19 Jan Hubicka <[email protected]>
12+
13+
PR ipa/83001
14+
* profile-count.c (profile_count::to_sreal_scale): Fix return value
15+
for uninitialied counts.
16+
17+
2017-11-19 Jan Hubicka <[email protected]>
18+
19+
PR ipa/60243
20+
* tree-inline.c (estimate_num_insns): Set to 1 at least.
21+
22+
2017-11-19 Jan Hubicka <[email protected]>
23+
24+
PR target/82713
25+
* i386.c (ix86_builtin_vectorization_cost): Be ready for insane
26+
types.
27+
128
2017-11-19 Tom de Vries <[email protected]>
229

330
* config/arc/arc.h (FUNCTION_PROFILER): Remove semicolon after

gcc/ada/ChangeLog

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2017-11-20 Eric Botcazou <[email protected]>
2+
3+
PR ada/83016
4+
* gnatlink.adb (Process_Args): Accept multiple switches for --LINK.
5+
(Usage): Adjust.
6+
* gcc-interface/Makefile.in (GCC_LINK): Remove $(ADA_INCLUDES).
7+
(common-tools): Pass $(CC) as --GCC= and $(GCC_LINK) as --LINK= in
8+
the invocations of $(GNATLINK).
9+
(../../gnatdll$(exeext)): Likewise.
10+
(../../vxaddr2line$(exeext)): Likewise.
11+
(gnatmake-re): Likewise.
12+
(gnatlink-re): Likewise.
13+
114
2017-11-16 Doug Rupp <[email protected]>
215

316
* gcc-interface/Makefile.in: Merge Aarch64 and ARM "ifeq" blocks.
@@ -32,7 +45,7 @@
3245

3346
* doc/gnat_ugn/gnat_utility_programs.rst (GNAT UGN): Add
3447
gnatsymbolize documentation.
35-
* gnat_ugn.texi: Regenerate.
48+
* gnat_ugn.texi: Regenerate.
3649

3750
2017-11-16 Steve Baird <[email protected]>
3851

gcc/ada/gcc-interface/Makefile.in

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,7 @@ TOOLS_FLAGS_TO_PASS= \
21112111
"GNATLINK=$(GNATLINK)" \
21122112
"GNATBIND=$(GNATBIND)"
21132113

2114-
GCC_LINK=$(CXX) $(GCC_LINK_FLAGS) $(ADA_INCLUDES) $(LDFLAGS)
2114+
GCC_LINK=$(CXX) $(GCC_LINK_FLAGS) $(LDFLAGS)
21152115

21162116
# Build directory for the tools. Let's copy the target-dependent
21172117
# sources using the same mechanism as for gnatlib. The other sources are
@@ -2183,40 +2183,42 @@ common-tools: ../stamp-tools
21832183
gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \
21842184
gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS)
21852185
$(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \
2186-
--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2186+
--GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" $(TOOLS_LIBS)
21872187
$(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \
2188-
--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2188+
--GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" $(TOOLS_LIBS)
21892189
$(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \
2190-
--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2190+
--GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" $(TOOLS_LIBS)
21912191
$(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \
2192-
--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2192+
--GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" $(TOOLS_LIBS)
21932193
$(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \
2194-
--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2194+
--GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" $(TOOLS_LIBS)
21952195
$(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \
2196-
--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2196+
--GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" $(TOOLS_LIBS)
21972197
$(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \
2198-
--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2198+
--GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" $(TOOLS_LIBS)
21992199
$(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \
2200-
--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2200+
--GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" $(TOOLS_LIBS)
22012201
$(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \
2202-
--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2202+
--GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" $(TOOLS_LIBS)
22032203

22042204
../../gnatdll$(exeext): ../stamp-tools
22052205
$(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
22062206
$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatdll
2207-
$(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2207+
$(GNATLINK) -v gnatdll -o $@ \
2208+
--GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" $(TOOLS_LIBS)
22082209

22092210
../../vxaddr2line$(exeext): ../stamp-tools
22102211
$(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
22112212
$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
2212-
$(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" ../targext.o $(CLIB)
2213+
$(GNATLINK) -v vxaddr2line -o $@ \
2214+
--GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" ../targext.o $(CLIB)
22132215

22142216
gnatmake-re: ../stamp-tools
22152217
$(GNATMAKE) -j0 $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
22162218
$(GNATMAKE) -j0 -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
22172219
$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
22182220
$(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
2219-
--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2221+
--GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" $(TOOLS_LIBS)
22202222

22212223
# Note the use of the "mv" command in order to allow gnatlink to be linked with
22222224
# with the former version of gnatlink itself which cannot override itself.
@@ -2226,7 +2228,7 @@ gnatlink-re: ../stamp-tools gnatmake-re
22262228
$(GNATMAKE) -j0 -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
22272229
$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
22282230
$(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
2229-
--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2231+
--GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" $(TOOLS_LIBS)
22302232
$(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
22312233

22322234
# Needs to be built with CC=gcc

gcc/ada/gnatlink.adb

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -529,15 +529,35 @@ procedure Gnatlink is
529529
Exit_With_Error ("Missing argument for --LINK=");
530530
end if;
531531

532-
Linker_Path :=
533-
System.OS_Lib.Locate_Exec_On_Path (Arg (8 .. Arg'Last));
532+
declare
533+
L_Args : constant Argument_List_Access :=
534+
Argument_String_To_List (Arg (8 .. Arg'Last));
535+
begin
536+
-- The linker program is the first argument
537+
538+
Linker_Path :=
539+
System.OS_Lib.Locate_Exec_On_Path (L_Args.all (1).all);
540+
541+
if Linker_Path = null then
542+
Exit_With_Error
543+
("Could not locate linker: " & L_Args.all (1).all);
544+
end if;
545+
546+
-- The other arguments are passed as-is to the linker
547+
548+
for J in 2 .. L_Args.all'Last loop
549+
Gcc_Linker_Options.Increment_Last;
550+
Gcc_Linker_Options.Table
551+
(Gcc_Linker_Options.Last) :=
552+
new String'(L_Args.all (J).all);
553+
end loop;
554+
end;
534555

535-
if Linker_Path = null then
536-
Exit_With_Error
537-
("Could not locate linker: " & Arg (8 .. Arg'Last));
556+
elsif Arg'Length >= 6 and then Arg (1 .. 6) = "--GCC=" then
557+
if Arg'Length = 6 then
558+
Exit_With_Error ("Missing argument for --GCC=");
538559
end if;
539560

540-
elsif Arg'Length > 6 and then Arg (1 .. 6) = "--GCC=" then
541561
declare
542562
Program_Args : constant Argument_List_Access :=
543563
Argument_String_To_List
@@ -1413,8 +1433,8 @@ procedure Gnatlink is
14131433
Write_Line (" -M Create map file mainprog.map");
14141434
end if;
14151435

1416-
Write_Line (" --GCC=comp Use comp as the compiler");
1417-
Write_Line (" --LINK=nam Use 'nam' for the linking rather than 'gcc'");
1436+
Write_Line (" --GCC=comp Use 'comp' as the compiler rather than 'gcc'");
1437+
Write_Line (" --LINK=lnk Use 'lnk' as the linker rather than 'gcc'");
14181438
Write_Eol;
14191439
Write_Line (" [non-Ada-objects] list of non Ada object files");
14201440
Write_Line (" [linker-options] other options for the linker");

gcc/c-family/ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2017-11-19 Jakub Jelinek <[email protected]>
2+
3+
PR c/66618
4+
PR c/69960
5+
* c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
6+
17
2017-11-16 Joseph Myers <[email protected]>
28

39
* c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018

gcc/c-family/c-common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ extern tree c_build_bitfield_integer_type (unsigned HOST_WIDE_INT, int);
828828
extern enum conversion_safety unsafe_conversion_p (location_t, tree, tree, tree,
829829
bool);
830830
extern bool decl_with_nonnull_addr_p (const_tree);
831-
extern tree c_fully_fold (tree, bool, bool *);
831+
extern tree c_fully_fold (tree, bool, bool *, bool = false);
832832
extern tree c_wrap_maybe_const (tree, bool);
833833
extern tree c_common_truthvalue_conversion (location_t, tree);
834834
extern void c_apply_type_quals_to_decl (int, tree);

gcc/c/ChangeLog

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
2017-11-19 Jakub Jelinek <[email protected]>
2+
3+
PR c/66618
4+
PR c/69960
5+
* c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
6+
where needed.
7+
* c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
8+
handle_omp_array_sections): Likewise.
9+
(digest_init): Don't call decl_constant_value_for_optimization.
10+
* c-tree.h (decl_constant_value_for_optimization): Removed.
11+
* c-fold.c (c_fold_array_ref): New function.
12+
(c_fully_fold_internal): Add LVAL argument, propagate it through
13+
recursive calls. For VAR_P call decl_constant_value and
14+
unshare if not LVAL and either optimizing or IN_INIT. Remove
15+
decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
16+
fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
17+
(c_fully_fold): Add LVAL argument, pass it through to
18+
c_fully_fold_internal.
19+
(decl_constant_value_for_optimization): Removed.
20+
121
2017-11-15 Joseph Myers <[email protected]>
222

323
PR c/81156

0 commit comments

Comments
 (0)