Re: [PINGv2][PATCH] Ignore alignment by option

2014-12-04 Thread Jakub Jelinek
On Thu, Dec 04, 2014 at 08:26:24PM +0300, Yuri Gribov wrote: On Thu, Dec 4, 2014 at 8:06 PM, 'Dmitry Vyukov' via address-sanitizer address-saniti...@googlegroups.com wrote: You answered your own question about user space :) Yeah, I hoped someone would rush to overpersuade me... While in C

Fix sreal::shift add to_double conversion

2014-12-04 Thread Jan Hubicka
Hi, this patch fixes implementation of shift in sreal.h that ICEs on 0 value. Also the comment is copied from shift_right and does not make sense for sreal.h. The to_double conversion is useful for debug output: Most of inliner data is now output as integer that does not make much sense.

Re: [PATCH] pr63621 - don't ICE when section attribute is used on things in comdats

2014-12-04 Thread Jan Hubicka
From: Trevor Saunders tsaund...@mozilla.com Hi, In this pr we have a section attribute being applied to something in a comdat group. Since its ok for things to be in a comdat group and have an implicit section it seems it should also be fine to have a section from the attribute.

Re: [patch c++]: Fix PR/64127 ICE on invalid: tree check: exprected identifier_node, have template_id_expr in cp_parser_diagnose_invalid_type_name

2014-12-04 Thread Kai Tietz
So added testcase for this pr (its c++98 only) So: ChangeLog testsuite 2014-12-04 Kai Tietz kti...@redhat.com PR c++/64127 * g++.dg/cpp/pr64127.C: New file. Tested on x86_64-unknown-linux-gnu. Ok to apply prior posted patch plus this new testcase? Regards, Kai Index:

Re: [PATCH] DWARF add DW_AT_noreturn on noreturn function subprogram.

2014-12-04 Thread Mike Stump
On Dec 3, 2014, at 1:18 PM, Jeff Law l...@redhat.com wrote: The problem is that waiting for the final spec means effectively GCC doesn't support the feature until gcc-6 in 2016 just due to the expected timing of the dwarf5 standard and the gcc release schedule. They pretty much couldn't

Re: [PATCH] Careful with BIT_NOT_EXPR folding (PR middle-end/56917)

2014-12-04 Thread Marek Polacek
On Thu, Dec 04, 2014 at 05:34:35PM +0100, Richard Biener wrote: On December 4, 2014 4:45:25 PM CET, Marek Polacek pola...@redhat.com wrote: The PR shows a case in which fold introduces undefined behavior in a valid program, because what it does here is -(long int) (ul + ULONG_MAX) - 1 -

Re: [PATCH] Careful with BIT_NOT_EXPR folding (PR middle-end/56917)

2014-12-04 Thread Richard Biener
On December 4, 2014 7:37:32 PM CET, Marek Polacek pola...@redhat.com wrote: On Thu, Dec 04, 2014 at 05:34:35PM +0100, Richard Biener wrote: On December 4, 2014 4:45:25 PM CET, Marek Polacek pola...@redhat.com wrote: The PR shows a case in which fold introduces undefined behavior in a valid

Re: asan: support for globals in kernel

2014-12-04 Thread Dmitry Vyukov
On Wed, Dec 3, 2014 at 9:19 AM, Andrey Ryabinin a.ryabi...@samsung.com wrote: On 12/02/2014 08:56 PM, Dmitry Vyukov wrote: Hi, The following patch adds support for instrumentation of globals for Linux kernel (-fsanitize=kernel-address). Kernel only supports constructors with default

Re: asan: support for globals in kernel

2014-12-04 Thread Jakub Jelinek
On Thu, Dec 04, 2014 at 11:10:15PM +0400, Dmitry Vyukov wrote: That would be an option too. I don't know whether it is much better or not. Kernel lives without constructors, they are used only by coverage. And coverage does not need priorities. So it is only kasan that needs priorities. That

Re: Fix sreal::shift add to_double conversion

2014-12-04 Thread Richard Biener
On December 4, 2014 7:00:12 PM CET, Jan Hubicka hubi...@ucw.cz wrote: Hi, this patch fixes implementation of shift in sreal.h that ICEs on 0 value. Also the comment is copied from shift_right and does not make sense for sreal.h. The to_double conversion is useful for debug output: Most of inliner

Re: asan: support for globals in kernel

2014-12-04 Thread Dmitry Vyukov
will wait for Andrey this time On Thu, Dec 4, 2014 at 10:12 PM, Jakub Jelinek ja...@redhat.com wrote: On Thu, Dec 04, 2014 at 11:10:15PM +0400, Dmitry Vyukov wrote: That would be an option too. I don't know whether it is much better or not. Kernel lives without constructors, they are used

Re: Fix folding of EQ/NE_EXPR WRT symtab aliases

2014-12-04 Thread Richard Biener
On December 4, 2014 6:34:18 PM CET, Jan Hubicka hubi...@ucw.cz wrote: I think you want get_addr_base_and_unit_offset here. But I really wonder I copied what I found in tree-ssa-alias. The differenc eis that get_addr_base_and_unit_offset won't give a range for variable sized accesses right?

Re: [PATCH] PR 62173, re-shuffle insns for RTL loop invariant hoisting

2014-12-04 Thread Jiong Wang
On 04/12/14 11:07, Richard Biener wrote: On Thu, Dec 4, 2014 at 12:07 PM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Dec 4, 2014 at 12:00 PM, Jiong Wang jiong.w...@arm.com wrote: which means re-associate the constant imm with the virtual frame pointer. transform RA -

Re: [PATCH x86_64] Optimize access to globals in -fpie -pie builds with copy relocations

2014-12-04 Thread Uros Bizjak
On Thu, Dec 4, 2014 at 5:46 PM, H.J. Lu hjl.to...@gmail.com wrote: It would probably help reviewers if you pointed to actual path submission [1], which unfortunately contains the explanation in the patch itself [2], which further explains that this functionality is currently only supported

Re: [patch c++]: Fix PR/64127 ICE on invalid: tree check: exprected identifier_node, have template_id_expr in cp_parser_diagnose_invalid_type_name

2014-12-04 Thread Jason Merrill
On 12/04/2014 10:12 AM, Kai Tietz wrote: else if (cxx_dialect cxx11 +DECL_P (id) !strcmp (IDENTIFIER_POINTER (id), thread_local)) This doesn't make any sense: If it's a decl it isn't an identifier. Did you mean to check for IDENTIFIER_NODE? Jason

Re: [PATCH 3/n] OpenMP 4.0 offloading infrastructure: offload tables

2014-12-04 Thread Ilya Verbin
Hi, On 30 Sep 18:53, Ilya Verbin wrote: This patch creates 2 vectors with decls: offload_funcs and offload_vars. libgomp will use addresses from these arrays to look up offloaded code. During the compilation they are outputted to: * binary __gnu_offload_funcs/vars sections, or using

Re: [patch c++]: Fix PR c++/64106 ICE on valid code

2014-12-04 Thread Jason Merrill
My patch from yesterday fixed this bug. PR c++/64080 * constexpr.c (cxx_eval_store_expression): Handle non-decl store targets. Jason

Re: [PATCH] Fix the rest of PR target/64056

2014-12-04 Thread Mike Stump
On Dec 4, 2014, at 7:22 AM, Ilya Enkovich enkovich@gmail.com wrote: -- 2014-12-04 Ilya Enkovich ilya.enkov...@intel.com PR target/64056 * lib/target-supports.exp (check_effective_target_stpcpy): New. Thanks for the notice! I see there is also no description for mempcpy

Re: [PATCH 3/n] OpenMP 4.0 offloading infrastructure: offload tables

2014-12-04 Thread Jakub Jelinek
On Thu, Dec 04, 2014 at 10:35:19PM +0300, Ilya Verbin wrote: This issue can be resolved by forcing output of such variables. Is this fix ok? Should I add a testcase? Yes, with proper ChangeLog. Yes. diff --git a/gcc/varpool.c b/gcc/varpool.c index 0526b7f..db28c2a 100644 ---

Re: [patch c++]: Fix PR/64127 ICE on invalid: tree check: exprected identifier_node, have template_id_expr in cp_parser_diagnose_invalid_type_name

2014-12-04 Thread Kai Tietz
2014-12-04 20:35 GMT+01:00 Jason Merrill ja...@redhat.com: On 12/04/2014 10:12 AM, Kai Tietz wrote: else if (cxx_dialect cxx11 +DECL_P (id) !strcmp (IDENTIFIER_POINTER (id), thread_local)) This doesn't make any sense: If it's a decl it isn't an

Re: Fix sreal::shift add to_double conversion

2014-12-04 Thread Jan Hubicka
On December 4, 2014 7:00:12 PM CET, Jan Hubicka hubi...@ucw.cz wrote: Hi, this patch fixes implementation of shift in sreal.h that ICEs on 0 value. Also the comment is copied from shift_right and does not make sense for sreal.h. The to_double conversion is useful for debug output: Most of

Re: [patch c++]: Fix PR c++/64106 ICE on valid code

2014-12-04 Thread Marek Polacek
On Thu, Dec 04, 2014 at 02:37:54PM -0500, Jason Merrill wrote: My patch from yesterday fixed this bug. PR c++/64080 * constexpr.c (cxx_eval_store_expression): Handle non-decl store targets. I don't see such a patch neither on ML nor in git. Marek

Re: Fix folding of EQ/NE_EXPR WRT symtab aliases

2014-12-04 Thread Jan Hubicka
On December 4, 2014 6:34:18 PM CET, Jan Hubicka hubi...@ucw.cz wrote: I think you want get_addr_base_and_unit_offset here. But I really wonder I copied what I found in tree-ssa-alias. The differenc eis that get_addr_base_and_unit_offset won't give a range for variable sized accesses

Re: [patch c++]: Fix PR/64127 ICE on invalid: tree check: exprected identifier_node, have template_id_expr in cp_parser_diagnose_invalid_type_name

2014-12-04 Thread Kai Tietz
Updated version checking the right thing ... ChangeLog gcc/cp 2014-12-04 Kai Tietz kti...@redhat.com PR c++/64127 * parser.c (cp_parser_diagnose_invalid_type_name): Check id for being an identifier before accessing it. Tested on x86_64-unknown-linux-gnu. Ok for apply together

Re: [patch c++]: Fix PR c++/64106 ICE on valid code

2014-12-04 Thread Jason Merrill
On 12/04/2014 03:05 PM, Marek Polacek wrote: On Thu, Dec 04, 2014 at 02:37:54PM -0500, Jason Merrill wrote: My patch from yesterday fixed this bug. PR c++/64080 * constexpr.c (cxx_eval_store_expression): Handle non-decl store targets. I don't see such a patch

C++ PATCH for c++/64029 (reference to array of unknown bound)

2014-12-04 Thread Jason Merrill
The problem was that the extended reference temporary never got its array type completed. Doing it in the extension code didn't work because by that time the initializer already has incomplete array type. So let's handle it in grok_reference_init. Tested x86_64-pc-linux-gnu, applying to

C++ PATCH for c++/64080 (constexpr store to non-variable)

2014-12-04 Thread Jason Merrill
cxx_eval_store_expression was too strict; a store to something where we can't figure out which variable it refers to shouldn't ICE, just make the expression non-constant. Tested x86_64-pc-linux-gnu, applying to trunk. commit 796c5ad03637ba9452639262cef57db83cd60cba Author: Jason Merrill

Re: [patch c++]: Fix PR/64127 ICE on invalid: tree check: exprected identifier_node, have template_id_expr in cp_parser_diagnose_invalid_type_name

2014-12-04 Thread Jason Merrill
OK, thanks. Jason

Re: [patch c++]: Fix PR/64100 'A static assert using the the current class in a noexcept test leads to a segfault'

2014-12-04 Thread Jason Merrill
On 12/04/2014 10:57 AM, Kai Tietz wrote: Well, I spared that as this is an invalid code bug with a lot of side-errors, which might change over time. Every patch should have an associated testcase unless it's fixing an existing test or writing a testcase is somehow not feasible. Many tests

Re: [PATCH] Fix PR 61225

2014-12-04 Thread Segher Boessenkool
On Thu, Dec 04, 2014 at 04:43:34PM +0800, Zhenqiang Chen wrote: C code: if (!--*p) rtl code: 6: r91:SI=[r90:SI] 7: {r88:SI=r91:SI-0x1;clobber flags:CC;} 8: [r90:SI]=r88:SI 9: flags:CCZ=cmp(r88:SI,0) expected output: 8:

Re: [PATCH] Fix PR 61225

2014-12-04 Thread Segher Boessenkool
On Thu, Dec 04, 2014 at 02:49:56PM -0600, Segher Boessenkool wrote: On Thu, Dec 04, 2014 at 04:43:34PM +0800, Zhenqiang Chen wrote: C code: if (!--*p) rtl code: 6: r91:SI=[r90:SI] 7: {r88:SI=r91:SI-0x1;clobber flags:CC;} 8: [r90:SI]=r88:SI 9:

[PATCH] PR jit/63854: Introduce xstrdup_for_dump

2014-12-04 Thread David Malcolm
The auto_ptr idea sounds invasive (and made me wonder - why not go the whole way and use std::string?) Here's an implementation of the xstrdup_for_dump idea. To recap the motivation: cgraph*.c and ipa-*.c use xstrdup on strings when dumping them via fprintf, leaking all of the duplicated

Re: [patch c++]: Fix PR/64100 'A static assert using the the current class in a noexcept test leads to a segfault'

2014-12-04 Thread Kai Tietz
Ok, Additional change for testcase mentioned in PR. ChangeLog 2014-12-04 Kai Tietz kti...@redhat.com PR c++/641000 * g++.dg/template/pr64100.C: New file. Ok for apply? Regards, Kai Index: gcc/gcc/testsuite/g++.dg/template/pr64100.C

[PATCH 02/02] PR jit/64166: Add API entrypoint gcc_jit_context_enable_dump

2014-12-04 Thread David Malcolm
This is the JIT-specific part of the patch for PR jit/64166. Implement a way to get at dumpfiles from JIT testcases. Use it from test-sum-of-squares.c to provide a simple selftest of the dumping functionality, and use it from test-functions.c to add verification of the fix for PR jit/64020.

[PATCH 01/02] PR jit/64166: Add methods to gcc::dump_manager needed by JIT testing

2014-12-04 Thread David Malcolm
This is the non-JIT part of the patch for PR jit/64166. Provide a way for the JIT to lookup a dump_file_info * by switch name, and to get from there to the filename. OK for trunk? gcc/ChangeLog: PR jit/64166 * dumpfile.c (gcc::dump_manager::get_dump_file_info_by_switch):

[PATCH] PR other/63613: Add fixincludes for dejagnu.h

2014-12-04 Thread David Malcolm
dejagnu.h assumed -fgnu89-inline until a recent upstream fix; see http://lists.gnu.org/archive/html/dejagnu/2014-10/msg00011.html Remove the workaround from jit.exp that used -fgnu89-inline in favor of a fixincludes to dejagnu.h that applies the upstream fix to a local copy. This should make it

Re: [ping] account for register spans in expand_builtin_init_dwarf_reg_sizes

2014-12-04 Thread Jason Merrill
On 11/24/2014 03:08 AM, Olivier Hainque wrote: + if (init_state-processed_regno[regno]) +return; I would expect this to go in the loop in expand_builtin_init_dwarf_reg_sizes, before we look up a span for the regno. OK with that change. Jason

Re: [patch c++]: Fix PR/64100 'A static assert using the the current class in a noexcept test leads to a segfault'

2014-12-04 Thread Jason Merrill
OK, thanks. Jason

Re: [PATCH x86_64] Optimize access to globals in -fpie -pie builds with copy relocations

2014-12-04 Thread Dominique Dhumieres
Normally, with -fPIE/-fpie, GCC accesses globals that are extern to the module using the GOT. This is two instructions, one to get the address of the global from the GOT and the other to get the value. If it turns out that the global gets defined in the executable at link-time, it still

Re: [PATCH] PR other/63613: Add fixincludes for dejagnu.h

2014-12-04 Thread Rainer Orth
David Malcolm dmalc...@redhat.com writes: dejagnu.h assumed -fgnu89-inline until a recent upstream fix; see http://lists.gnu.org/archive/html/dejagnu/2014-10/msg00011.html Remove the workaround from jit.exp that used -fgnu89-inline in favor of a fixincludes to dejagnu.h that applies the

Re: [PATCH driver/diagnostics] init color earlier, add color to driver

2014-12-04 Thread Manuel López-Ibáñez
On 3 December 2014 at 08:59, Jakub Jelinek ja...@redhat.com wrote: I think using a default argument for this is fine, though of course you need to declare the default argument in the header containing the prototype, not in the function definition. Ok with that change. This is what I have

Re: [PATCH] PR jit/63854: Introduce xstrdup_for_dump

2014-12-04 Thread Jan Hubicka
The auto_ptr idea sounds invasive (and made me wonder - why not go the whole way and use std::string?) That would work for me too :) Here's an implementation of the xstrdup_for_dump idea. To recap the motivation: cgraph*.c and ipa-*.c use xstrdup on strings when dumping them via

Re: [PATCH fortran/linemap] Add enough column hint to fit any possible offset

2014-12-04 Thread Manuel López-Ibáñez
On 4 December 2014 at 11:21, Tobias Burnus tobias.bur...@physik.fu-berlin.de wrote: Manuel López-Ibáñez wrote: It is still not clear to me if line_len is the length of the line read or not, is it? If not, is there any way to actually get the length of the line? Looking at the code in

Re: [PATCH x86_64] Optimize access to globals in -fpie -pie builds with copy relocations

2014-12-04 Thread H.J. Lu
On Thu, Dec 4, 2014 at 2:19 PM, Dominique Dhumieres domi...@lps.ens.fr wrote: Normally, with -fPIE/-fpie, GCC accesses globals that are extern to the module using the GOT. This is two instructions, one to get the address of the global from the GOT and the other to get the value. If it turns

Re: [PATCH obvious/diagnostics] Honor override_column when printing the caret

2014-12-04 Thread Manuel López-Ibáñez
On 3 December 2014 at 09:48, Dodji Seketeli do...@redhat.com wrote: Manuel López-Ibáñez lopeziba...@gmail.com writes: libcpp uses diagnostic-override_column to give a custom column number to diagnostics. This is taken into account when building the prefix, but it was missing when placing the

[Ping] [PATCH, ifcvt] Fix PR63917

2014-12-04 Thread Zhenqiang Chen
Ping? Thanks! -Zhenqiang -Original Message- From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches-ow...@gcc.gnu.org] On Behalf Of Zhenqiang Chen Sent: Monday, December 01, 2014 3:14 PM To: 'H.J. Lu' Cc: Richard Henderson; GCC Patches Subject: RE: [PATCH, ifcvt] Fix PR63917

[PATCH] allow passing argument to the JIT linker

2014-12-04 Thread Ulrich Drepper
If you generate code with the JIT which references outside symbols there is currently no way to have a self-contained DSO created. The command line to invoke the linker is fixed. The patch below would change that. It builds upon the existing framework to specify options for the compiler. The

<    1   2