PR bootstrap/64023
* Makefile.tpl (EXTRA_TARGET_FLAGS): Set STAGE1_LDFLAGS
to POSTSTAGE1_LDFLAGS and STAGE1_LIBS to POSTSTAGE1_LIBS.
Add -B to libstdc++-v3/src/.libs and libstdc++-v3/libsupc++/.libs
to CXX.
* Makefile.in: Regenerated.
From-SVN: r218705
Fix an unusual C to Go callback case. Newly created C threads
call into Go code, forcing the Go code to allocate new M and G
structures. While executing Go code, the stack is split. The
Go code then returns. Returning from a Go callback is treated
as entering a system call, so the G gcstack field is set to
point to the Go stack. In this case, though, we were called
from a newly created C thread, so we drop the extra M and G
structures. The C thread then exits.
Then a new C thread calls into Go code, reusing the previously
created M and G. The Go code requires a larger stack frame,
causing the old stack segment to be unmapped and a new stack
segment allocated. At this point the gcstack field is
pointing to the old stack segment.
Then a garbage collection occurs. The garbage collector sees
that the gcstack field is not nil, so it scans it as the first
stack segment. Unfortunately it points to memory that was
unmapped. So the program crashes.
The fix is simple: when handling extra G structures created
for callbacks from new C threads, clear the gcstack field.
From-SVN: r218699
gcc/
* config/nvptx/nvptx.h (ASM_OUTPUT_ALIGN): Define as a C statment.
gcc/doc/tm.texi:@defmac ASM_OUTPUT_ALIGN (@var{stream}, @var{power})
gcc/doc/tm.texi-A C statement to output to the stdio stream @var{stream} an assembler
gcc/doc/tm.texi-command to advance the location counter to a multiple of 2 to the
gcc/doc/tm.texi-@var{power} bytes. @var{power} will be a C expression of type @code{int}.
gcc/doc/tm.texi-@end defmac
gcc/config/nvptx/nvptx.h:#define ASM_OUTPUT_ALIGN(FILE, POWER)
"Empty" is not a C statement, and so in code such as:
gcc/dwarf2out.c- if (lsda_encoding == DW_EH_PE_aligned)
gcc/dwarf2out.c: ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE));
gcc/dwarf2out.c- dw2_asm_output_data (size_of_encoded_value (lsda_encoding), 0,
gcc/dwarf2out.c- "Language Specific Data Area (none)");
gcc/varasm.c- if (align > BITS_PER_UNIT)
gcc/varasm.c: ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (align / BITS_PER_UNIT));
gcc/varasm.c- assemble_variable_contents (decl, name, dont_output_data);
gcc/varasm.c- if (align > 0)
gcc/varasm.c: ASM_OUTPUT_ALIGN (asm_out_file, align);
gcc/varasm.c-
gcc/varasm.c- targetm.asm_out.internal_label (asm_out_file, "LTRAMP", 0);
gcc/varasm.c- if (align > BITS_PER_UNIT)
gcc/varasm.c: ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (align / BITS_PER_UNIT));
gcc/varasm.c- assemble_constant_contents (exp, XSTR (symbol, 0), align);
..., GCC warns:
[...]/source-gcc/gcc/dwarf2out.c: In function 'void output_fde(dw_fde_ref, bool, bool, char*, int, char*, bool, int)':
[...]/source-gcc/gcc/dwarf2out.c:665:3: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE));
^
[...]/source-gcc/gcc/varasm.c: In function 'void assemble_variable(tree, int, int, int)':
[...]/source-gcc/gcc/varasm.c:2217:2: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (align / BITS_PER_UNIT));
^
[...]/source-gcc/gcc/varasm.c: In function 'rtx_def* assemble_trampoline_template()':
[...]/source-gcc/gcc/varasm.c:2603:5: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
ASM_OUTPUT_ALIGN (asm_out_file, align);
^
[...]/source-gcc/gcc/varasm.c: In function 'void output_constant_def_contents(rtx)':
[...]/source-gcc/gcc/varasm.c:3413:2: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (align / BITS_PER_UNIT));
^
Also, "use" the values, to get rid of that one:
[...]/source-gcc/gcc/final.c: In function 'rtx_insn* final_scan_insn(rtx_insn*, FILE*, int, int, int*)':
[...]/source-gcc/gcc/final.c:2450:12: warning: variable 'log_align' set but not used [-Wunused-but-set-variable]
int log_align;
^
From-SVN: r218689
2014-12-12 Vladimir Makarov <vmakarov@redhat.com>
PR target/64110
* lra-constraints.c (process_alt_operands): Refuse alternative
when reload pseudo of given class can not hold value of given
mode.
2014-12-12 Vladimir Makarov <vmakarov@redhat.com>
PR target/64110
* gcc.target/i386/pr64110.c: New.
From-SVN: r218688
* cp-tree.h (NAMESPACE_ABI_TAG): New.
* name-lookup.c (handle_namespace_attrs): Set it.
* class.c (check_tag): Split out from find_abi_tags_r.
(find_abi_tags_r): Also check namespace tags.
(mark_type_abi_tags): Also mark namespace tags.
From-SVN: r218684
gcc/
PR middle-end/64182
* wide-int.h (wi::div_round, wi::mod_round): Fix rounding of tied
cases.
* double-int.c (div_and_round_double): Fix handling of unsigned
cases. Use same rounding approach as wide-int.h.
gcc/testsuite/
2014-xx-xx Richard Sandiford <richard.sandiford@arm.com>
Joseph Myers <joseph@codesourcery.com>
PR middle-end/64182
* gcc.dg/plugin/wide-int-test-1.c,
gcc.dg/plugin/wide-int_plugin.c: New test.
* gcc.dg/plugin/plugin.exp: Register it.
* gnat.dg/round_div.adb: New test.
Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
From-SVN: r218678
PR tree-optimization/64269
* tree-ssa-forwprop.c (simplify_builtin_call): Bail out if
len2 or diff are too large.
* gcc.c-torture/compile/pr64269.c: New test.
From-SVN: r218669
* testsuite/lib/libstdc++.exp: Include target-utils.exp.
(v3_target_compile): Check if test is unsupported.
(v3_target_compile_as_c): Likewise.
From-SVN: r218661
2014-12-12 Zhenqiang Chen <zhenqiang.chen@arm.com>
PR rtl-optimization/63917
* ifcvt.c (cc_in_cond): New function.
(end_ifcvt_sequence): Make sure new generated insns do not clobber CC.
(noce_process_if_block, check_cond_move_block): Check CC references.
testsuite/ChangeLog:
2014-12-12 Zhenqiang Chen <zhenqiang.chen@arm.com>
* gcc.dg/pr64007.c: New test.
From-SVN: r218658