[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 li

[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 > -Ori

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 wrote: > Manuel López-Ibáñez 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 caret. >> >> Before: >> >> /h

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 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 >> out that th

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 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 load_line, the line_len in > >

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 v

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 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 committed at

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

2014-12-04 Thread Rainer Orth
David Malcolm writes: > 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 co

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 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: [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

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

2014-12-04 Thread David Malcolm
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 easier to

[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. gcc/

[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):

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 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] 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 buffe

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 >

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: {flags:CCZ=cmp([r90:SI]

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 in

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

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 Date:

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 trun

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 neithe

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 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 with testcase? Rega

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 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: Fix sreal::shift add to_double conversion

2014-12-04 Thread Jan Hubicka
> On December 4, 2014 7:00:12 PM CET, Jan Hubicka 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: [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 : > 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 identifi

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 > --- a/gcc/var

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 wrote: >>> -- >>> 2014-12-04 Ilya Enkovich >>> >>> 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 target > check. So add both of

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 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/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] 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 wrote: On Thu, Dec 4, 2014 at 12:00 PM, Jiong Wang wrote: which means re-associate the constant imm with the virtual frame pointer. transform RA <- fixed_reg + RC RD <- MEM (RA + const_off

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 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

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 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? Yes. Bu

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 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 only by coverag

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 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 >data i

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. Tha

Re: asan: support for globals in kernel

2014-12-04 Thread Dmitry Vyukov
On Wed, Dec 3, 2014 at 9:19 AM, Andrey Ryabinin 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 priority, but the re

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 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 > wrote: >> >The PR shows a case in which fold introduces undefined behavior in a >> >valid program, because what it does h

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 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 -> > >~(long int) (u

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 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 > line up much w

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 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: gcc/gcc/testsuite/g++.dg/c

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

2014-12-04 Thread Jan Hubicka
> From: Trevor Saunders > > 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. > > bootstrapped + reg

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. Bootstra

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 > wrote: > > You answered your own question about user space :) > > Yeah, I hoped someone would rush to overpersuade me... While in C unaligned accesses are UB, I

Re: [PATCH 2/2, PR 63814] Do not re-create expanded artificial thunks

2014-12-04 Thread Jan Hubicka
> > I did not really like it either (although I must say that in general I > really dislike the need to call expand_thunk but telling it to not Yeah, I am thinking about simply teaching inliner to handle them. Given the issues with extra copies for values passed by reference it may be better so

Re: Fix folding of EQ/NE_EXPR WRT symtab aliases

2014-12-04 Thread Jan Hubicka
> > 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? > what cases this code catches that the code in fold_comparison you t

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

2014-12-04 Thread Yuri Gribov
On Thu, Dec 4, 2014 at 8:06 PM, 'Dmitry Vyukov' via address-sanitizer wrote: > You answered your own question about user space :) Yeah, I hoped someone would rush to overpersuade me... -Y

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

2014-12-04 Thread Dmitry Vyukov
On Thu, Dec 4, 2014 at 5:16 PM, Yury Gribov wrote: > On 12/04/2014 05:04 PM, Dmitry Vyukov wrote: >> >> On Thu, Dec 4, 2014 at 4:48 PM, Yury Gribov wrote: >>> >>> On 12/04/2014 03:47 PM, Dmitry Vyukov wrote: size_in_bytes = -1 instrumentation is too slow to be the default in k

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 4:44 AM, Uros Bizjak wrote: > On Wed, Dec 3, 2014 at 10:35 PM, H.J. Lu 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 explain

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

2014-12-04 Thread Richard Biener
On December 4, 2014 4:45:25 PM CET, Marek Polacek 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 -> >~(long int) (ul + ULONG_MAX) -> >-(long int) ul >But the latter transformation is wrong

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 Jakub Jelinek
On Thu, Dec 04, 2014 at 04:59:21PM +0100, Kai Tietz wrote: > Same as said before. Issue is a invalid-code bug with ICE, and > error-messages are pretty meaningless. It would be helpful to have in > testsuite just the opportunity to test for no ICE. You can add just // { dg-error "" } on all line

Re: [patch v2, aarch64] additional bics patterns

2014-12-04 Thread Eric Botcazou
> 2014-11-19 Sandra Loosemore > > gcc/ > * simplify-rtx.c (simplify_relational_operation_1): Handle > simplification identities for BICS patterns. > > gcc/testsuite/ > * gcc.target/aarch64/bics_4.c: New. OK for mainline, but there are trailing spaces in the patch

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 16:47 GMT+01:00 Marek Polacek : > On Thu, Dec 04, 2014 at 04:12:02PM +0100, Kai Tietz wrote: >> Hi, >> >> this patch fixes an ICE happening on invalid code for < c++11. It is >> reasoned by >> accessing blindly identifier without checking that it is a declaration. >> >> ChangeLog >> >>

Re: [PATCH] Set stores_off_frame_dead_at_return to false if sibling call

2014-12-04 Thread John David Anglin
On 12/1/2014 11:57 AM, Jeff Law wrote: Prior to reload (ie, in DSE1) there's a bit of magic in that we do not set frame_read on call insns. That may in fact be wrong and possibly the source of the problem. /* This field is only used for the processing of const functions. These functions

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
2014-12-04 16:46 GMT+01:00 Marek Polacek : > On Thu, Dec 04, 2014 at 04:00:34PM +0100, Kai Tietz wrote: >> Hi, >> >> The issue is that lookup_destructor calls >> adjust_result_of_qualified_name_lookup >> with an NULL_TREE decl (returned by lookup_member). So error-message >> is missing. >> >> As

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 Marek Polacek
On Thu, Dec 04, 2014 at 04:12:02PM +0100, Kai Tietz wrote: > Hi, > > this patch fixes an ICE happening on invalid code for < c++11. It is > reasoned by > accessing blindly identifier without checking that it is a declaration. > > ChangeLog > > 2014-12-04 Kai Tietz > > PR c++/64127 >

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 Marek Polacek
On Thu, Dec 04, 2014 at 04:00:34PM +0100, Kai Tietz wrote: > Hi, > > The issue is that lookup_destructor calls > adjust_result_of_qualified_name_lookup > with an NULL_TREE decl (returned by lookup_member). So error-message > is missing. > > As already discussed in bug-tracker: > > ChangeLog >

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

2014-12-04 Thread Marek Polacek
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 -> ~(long int) (ul + ULONG_MAX) -> -(long int) ul But the latter transformation is wrong if ul is unsigned long and equals LONG_MAX + 1UL, because that i

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Joseph Myers
On Thu, 4 Dec 2014, Richard Biener wrote: > OTOH this also means the user cannot provide a conforming > implementation on his own and get that used by GCC without editing > system headers or including a header with -isystem or similar > tricks. Well - you could have a pragma / attribute for that

Re: [patch, build] Restore bootstrap in building libcc1 on darwin

2014-12-04 Thread Iain Sandoe
On 4 Dec 2014, at 15:24, FX wrote: >> Can you try adding it as >> >> T_CFLAGS += -mdynamic-no-pic >> >> in gcc/config/t-tarwin instead? > -mdynamic-no-pic should be used to build *host* executable stuff for m32 darwin. It is not suitable for building shared libraries (hence the problem with

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Richard Biener
On Thu, 4 Dec 2014, Joseph Myers wrote: > On Thu, 4 Dec 2014, Richard Biener wrote: > > > So what does this all mean in practice for optimization passes? > > I don't know what it means in terms of how to fix the various existing > problems - it's simply how I think a fixed compiler should behav

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

2014-12-04 Thread Kai Tietz
Hi, this patch adds INDIRECT_REF support to cxx_eval_store_expression handling. There is a different variant suggested by Marek, which adds additional operand-0 to ref, which looks to me wrong. ChangeLog gcc/cp 2014-12-04 Kai Tietz PR c++/64106 * constexpr.c (cxx_eval_store_expressio

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Joseph Myers
On Thu, 4 Dec 2014, Richard Biener wrote: > So what does this all mean in practice for optimization passes? I don't know what it means in terms of how to fix the various existing problems - it's simply how I think a fixed compiler should behave. > When b) does not apply then the given stpcpy sp

Re: [patch, build] Restore bootstrap in building libcc1 on darwin

2014-12-04 Thread FX
> Can you try adding it as > > T_CFLAGS += -mdynamic-no-pic > > in gcc/config/t-tarwin instead? Nope, doing so fails to link libgcc_s.dylib: /Users/fx/devel/gcc/i/./gcc/xgcc -B/Users/fx/devel/gcc/i/./gcc/ -B/Users/fx/devel/gcc/i2/i386-apple-darwin14.0.0/bin/ -B/Users/fx/devel/gcc/i2/i386-appl

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

2014-12-04 Thread Ilya Enkovich
On 04 Dec 15:58, Rainer Orth wrote: > Hi Ilya, > > > > This patch adds a check for stpcpy function into > > gcc.target/i386/chkp-strlen-2.c test. > > > > make check RUNTESTFLAGS="i386.exp=chkp-strlen-2.c" is OK. OK for trunk? > > > > Thanks, > > Ilya > > -- > > 2014-12-04 Ilya Enkovich > > >

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Richard Biener
On Thu, 4 Dec 2014, Joseph Myers wrote: > On Thu, 4 Dec 2014, Richard Biener wrote: > > > Currently even when I prototype > > > > double exp10 (double); > > > > this function is not available to optimizers for code generation if > > they just check for builtin_decl_implicit (BUILT_IN_EXP10). >

[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
Hi, this patch fixes an ICE happening on invalid code for < c++11. It is reasoned by accessing blindly identifier without checking that it is a declaration. ChangeLog 2014-12-04 Kai Tietz PR c++/64127 * parser.c (cp_parser_diagnose_invalid_type_name): Check id for being a declar

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Joseph Myers
On Thu, 4 Dec 2014, Richard Biener wrote: > Currently even when I prototype > > double exp10 (double); > > this function is not available to optimizers for code generation if > they just check for builtin_decl_implicit (BUILT_IN_EXP10). > Curiously though the function is identified as BUILT_IN_E

[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
Hi, The issue is that lookup_destructor calls adjust_result_of_qualified_name_lookup with an NULL_TREE decl (returned by lookup_member). So error-message is missing. As already discussed in bug-tracker: ChangeLog 2014-12-04 Kai Tietz PR c++/64100 * typeck.c (lookup_destructor): Ha

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

2014-12-04 Thread Rainer Orth
Hi Ilya, > This patch adds a check for stpcpy function into > gcc.target/i386/chkp-strlen-2.c test. > > make check RUNTESTFLAGS="i386.exp=chkp-strlen-2.c" is OK. OK for trunk? > > Thanks, > Ilya > -- > 2014-12-04 Ilya Enkovich > > PR target/64056 > * lib/target-supports.exp (check

[PATCH] Fix the rest of PR target/64056

2014-12-04 Thread Ilya Enkovich
Hi, This patch adds a check for stpcpy function into gcc.target/i386/chkp-strlen-2.c test. make check RUNTESTFLAGS="i386.exp=chkp-strlen-2.c" is OK. OK for trunk? Thanks, Ilya -- 2014-12-04 Ilya Enkovich PR target/64056 * lib/target-supports.exp (check_effective_target_stpc

[PATCH] Update match-and-simplify docs

2014-12-04 Thread Richard Biener
Committed. Richard. 2014-12-04 Richard Biener * doc/match-and-simplify.texi: Update for recent changes. Index: doc/match-and-simplify.texi === --- doc/match-and-simplify.texi (revision 218352) +++ doc/match-and-simplify

Re: [Patch] Improving jump-thread pass for PR 54742

2014-12-04 Thread Sebastian Pop
Sebastian Pop wrote: > Jeff Law wrote: > > I'm a bit worried about compile-time impacts of the all the > > recursion > > I will also restrict the recursion to the loop in which we look for the FSM > thread. The attached patch includes this change. It passed bootstrap and regression test on x86_6

Re: [patch] Simplify non-inline function definitions for std::unordered_xxx containers

2014-12-04 Thread Jonathan Wakely
On 04/12/14 14:11 +, Jonathan Wakely wrote: Although this touches almost every line of the hashtable.h and hastable_policy.h files, it's mostly mechanical. The main purpose is to replace every use of X* with a typedef like X_pointer, which comes from the allocator. In the common case it's jus

Re: [PATCH x86] Enable v64qi permutations.

2014-12-04 Thread Uros Bizjak
On Thu, Dec 4, 2014 at 2:53 PM, Ilya Tocar wrote: >> >>> >> Can you add a few testcases? >> >>> > >> >>> > Isn't it already covered by gcc.dg/torture/vshuf* ? >> >>> > >> >>> >> >>> I didn't see them fail on my machines today. >> >> >> >> Those are executable testcases, those better should not fa

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

2014-12-04 Thread Yury Gribov
On 12/04/2014 05:04 PM, Dmitry Vyukov wrote: On Thu, Dec 4, 2014 at 4:48 PM, Yury Gribov wrote: On 12/04/2014 03:47 PM, Dmitry Vyukov wrote: size_in_bytes = -1 instrumentation is too slow to be the default in kernel. If we want to pursue this, I propose a different scheme. Handle 8+ byte acc

Re: [patch] Simplify non-inline function definitions for std::unordered_xxx containers

2014-12-04 Thread Jonathan Wakely
On 04/12/14 11:39 +, Jonathan Wakely wrote: On 03/12/14 23:32 +0100, François Dumont wrote: On 03/12/2014 16:59, Jonathan Wakely wrote: François (or anyone else), do you see any problem with this change? It makes the code shorter and I think is much easier to read, it also reduces the memo

Re: [patch, build] Restore bootstrap in building libcc1 on darwin

2014-12-04 Thread Richard Biener
On Thu, Dec 4, 2014 at 2:43 PM, Iain Sandoe wrote: > Hi Rainer, > > On 4 Dec 2014, at 13:32, Rainer Orth wrote: > >> FX writes: >> >>> 10-days ping >>> This restores bootstrap on a secondary target, target maintainer is OK with >>> it. I think I need build maintainers approval, so please review.

Re: [PATCH, i386] Add prefixes avoidance tuning for silvermont target

2014-12-04 Thread Ilya Enkovich
On 02 Dec 12:21, Uros Bizjak wrote: > On Tue, Dec 2, 2014 at 12:08 PM, Ilya Enkovich wrote: > > >> > Having stage1 close to end, may we make some decision regarding this > >> > patch? Having a couple of working variants, may we choose and use one > >> > of them? > >> > >> I propose to wait for Vl

Re: [PATCH] Mark explicit decls as implicit when we've seen a prototype

2014-12-04 Thread Jason Merrill
OK. Jason

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

2014-12-04 Thread Dmitry Vyukov
On Thu, Dec 4, 2014 at 4:48 PM, Yury Gribov wrote: > On 12/04/2014 03:47 PM, Dmitry Vyukov wrote: >> >> size_in_bytes = -1 instrumentation is too slow to be the default in >> kernel. >> >> If we want to pursue this, I propose a different scheme. >> Handle 8+ byte accesses as 1/2/4 accesses. No cha

Re: [PATCH x86] Enable v64qi permutations.

2014-12-04 Thread Ilya Tocar
On 04 Dec 13:51, Uros Bizjak wrote: > On Thu, Dec 4, 2014 at 1:45 PM, Uros Bizjak wrote: > > On Thu, Dec 4, 2014 at 1:04 PM, Jakub Jelinek wrote: > >> On Thu, Dec 04, 2014 at 04:00:27AM -0800, H.J. Lu wrote: > >>> >> Can you add a few testcases? > >>> > > >>> > Isn't it already covered by gcc.dg/

Re: [patch, build] Restore bootstrap in building libcc1 on darwin

2014-12-04 Thread Richard Biener
On Thu, Dec 4, 2014 at 2:52 PM, FX wrote: >> The default BOOT_CFLAGS are: -O2 -g -mdynamic-no-pic >> the libiberty pic build appends: -fno-common (and not even -fPIC) [NB -fPIC >> _won't_ override -mdynamic-no-pic, so that's not a simple way out] >> This means that the PIC library is being built

Re: [patch, build] Restore bootstrap in building libcc1 on darwin

2014-12-04 Thread FX
> The default BOOT_CFLAGS are: -O2 -g -mdynamic-no-pic > the libiberty pic build appends: -fno-common (and not even -fPIC) [NB -fPIC > _won't_ override -mdynamic-no-pic, so that's not a simple way out] > This means that the PIC library is being built with non-pic relocs. config/mh-darwin says tha

Re: [patch, build] Restore bootstrap in building libcc1 on darwin

2014-12-04 Thread Richard Biener
On Thu, Dec 4, 2014 at 2:48 PM, Richard Biener wrote: > On Thu, Dec 4, 2014 at 2:47 PM, Richard Biener > wrote: >> On Thu, Dec 4, 2014 at 2:43 PM, Iain Sandoe wrote: >>> Hi Rainer, >>> >>> On 4 Dec 2014, at 13:32, Rainer Orth wrote: >>> FX writes: > 10-days ping > This restore

Re: [patch, build] Restore bootstrap in building libcc1 on darwin

2014-12-04 Thread Richard Biener
On Thu, Dec 4, 2014 at 2:47 PM, Richard Biener wrote: > On Thu, Dec 4, 2014 at 2:43 PM, Iain Sandoe wrote: >> Hi Rainer, >> >> On 4 Dec 2014, at 13:32, Rainer Orth wrote: >> >>> FX writes: >>> 10-days ping This restores bootstrap on a secondary target, target maintainer is OK with

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

2014-12-04 Thread Yury Gribov
On 12/04/2014 03:47 PM, Dmitry Vyukov wrote: size_in_bytes = -1 instrumentation is too slow to be the default in kernel. If we want to pursue this, I propose a different scheme. Handle 8+ byte accesses as 1/2/4 accesses. No changes to 1/2/4 access handling. Currently when we allocate, say, 17-by

Re: [patch, build] Restore bootstrap in building libcc1 on darwin

2014-12-04 Thread Rainer Orth
FX writes: >> While in my testing, 64-bit Mac OS X 10.10.1 (x86_64-apple-darwin14.0.0) >> now bootstraps, but 32-bit (i386-apple-darwin14.0.0) does not: > > Is it due to my patch, or pre-existing bootstrap failure? I can't tell: before your patch, 32-bit bootstrap was broken due to PR bootstrap/

Re: [patch, build] Restore bootstrap in building libcc1 on darwin

2014-12-04 Thread Iain Sandoe
Hi Rainer, On 4 Dec 2014, at 13:32, Rainer Orth wrote: > FX writes: > >> 10-days ping >> This restores bootstrap on a secondary target, target maintainer is OK with >> it. I think I need build maintainers approval, so please review. > > While in my testing, 64-bit Mac OS X 10.10.1 (x86_64-appl

Re: [PATCH 2/3] Extended if-conversion

2014-12-04 Thread Richard Biener
On Thu, Dec 4, 2014 at 2:15 PM, Yuri Rumyantsev wrote: > Richard, > > I did simple change by saving gsi iterator for each bb that has > critical edges by adding additional field to bb_predicate_s: > > typedef struct bb_predicate_s { > > /* The condition under which this basic block is executed.

Re: [patch, build] Restore bootstrap in building libcc1 on darwin

2014-12-04 Thread FX
> While in my testing, 64-bit Mac OS X 10.10.1 (x86_64-apple-darwin14.0.0) > now bootstraps, but 32-bit (i386-apple-darwin14.0.0) does not: Is it due to my patch, or pre-existing bootstrap failure? How do you configure this 32-bit compiler? target/build/host/CFLAGS/CXXFLAGS/etc FX

Re: [Build, Graphite] Support ISL-0.14 with GCC 4.9

2014-12-04 Thread Richard Biener
On Thu, Dec 4, 2014 at 2:01 PM, Tobias Burnus wrote: > On Thu, Dec 04, 2014 at 12:30:39PM +0100, Richard Biener wrote: >> > OK for the 4.9 branch? >> I think for a system 0.14 ISL build which I just checked you need to >> adjust the ISL version check as well. > > Confirmed. Using additionally the

Re: Nuke CLOOGLIBS from trunk's gcc/Makefile.in

2014-12-04 Thread Richard Biener
On Thu, Dec 4, 2014 at 2:04 PM, Tobias Burnus wrote: > Nothing sets any more CLOOGLIBS and CLOOGINC - thus, we can > also remove it. > > The patch survived bootstrapping. OK? Ok. Thanks, Richard. > Tobias > > > diff --git a/gcc/Makefile.in b/gcc/Makefile.in > index 43405a0..98cff75 100644 > --

Re: [patch, build] Restore bootstrap in building libcc1 on darwin

2014-12-04 Thread Rainer Orth
FX writes: > 10-days ping > This restores bootstrap on a secondary target, target maintainer is OK with > it. I think I need build maintainers approval, so please review. While in my testing, 64-bit Mac OS X 10.10.1 (x86_64-apple-darwin14.0.0) now bootstraps, but 32-bit (i386-apple-darwin14.0.0)

Re: [PATCH 2/3] Extended if-conversion

2014-12-04 Thread Yuri Rumyantsev
Richard, I did simple change by saving gsi iterator for each bb that has critical edges by adding additional field to bb_predicate_s: typedef struct bb_predicate_s { /* The condition under which this basic block is executed. */ tree predicate; /* PREDICATE is gimplified, and the sequence

Nuke CLOOGLIBS from trunk's gcc/Makefile.in

2014-12-04 Thread Tobias Burnus
Nothing sets any more CLOOGLIBS and CLOOGINC - thus, we can also remove it. The patch survived bootstrapping. OK? Tobias diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 43405a0..98cff75 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1006,7 +1006,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBER

Re: [Build, Graphite] Support ISL-0.14 with GCC 4.9

2014-12-04 Thread Tobias Burnus
On Thu, Dec 04, 2014 at 12:30:39PM +0100, Richard Biener wrote: > > OK for the 4.9 branch? > I think for a system 0.14 ISL build which I just checked you need to > adjust the ISL version check as well. Confirmed. Using additionally the following patch survives bootstrapping here with --with-isl=

  1   2   >