Re: [Patch, Fortran] Prevent segfault with dump-*-original for implicit class expressions.

2015-04-25 Thread Mikael Morin
Hello, Le 13/03/2015 11:33, Andre Vehreschild a écrit : Hi all, this is another patch preventing a segfault. This time the segfault occurred, when -fdump-(fortran|tree)-original was given with the program having an implicit class set. The issue is that the _data component is assumed to be

Re: [PATCH] PRs target/65846/65886: Improve copy reloc in PIE

2015-04-25 Thread H.J. Lu
On Sat, Apr 25, 2015 at 08:46:58AM -0700, H.J. Lu wrote: Normally, with PIE, GCC accesses globals that are extern to the module using GOT. This is two instructions, one to get the address of the global from GOT and the other to get the value. Examples: --- extern int a_glob; int main ()

Re: [C/C++ PATCH] Implement -Wshift-negative-value (PR c/65179)

2015-04-25 Thread Marek Polacek
On Fri, Apr 24, 2015 at 03:31:55PM -0600, Martin Sebor wrote: There's a significant difference between the reasons why the behavior of the left shift is undefined when the left operand is negative vs when the right operand is, and between the results of such expressions computed by GCC and

Re: [C/C++ PATCH] Implement -Wshift-negative-value (PR c/65179)

2015-04-25 Thread Joseph Myers
On Sat, 25 Apr 2015, Marek Polacek wrote: + pedwarn (location, OPT_Wshift_negative_value, + left shift of negative value); Use of pedwarn is always suspect for something only undefined at runtime; it must not produce an error with -pedantic-errors in any

Re: [C/C++ PATCH] Improve -Wlogical-op (PR c/63357)

2015-04-25 Thread Gerald Pfeifer
2015-04-21 Marek Polacek pola...@redhat.com PR c/63357 * c-common.c (warn_logical_operator): Warn if the operands have the same expressions. This is nice! It really helped me find an issue or two in the Wine project. Unfortunately it also causes false positives:

Re: [Patch, Fortran] Simplify lbound

2015-04-25 Thread Mikael Morin
Le 25/04/2015 13:33, Thomas Koenig a écrit : Hello world, this is a simplification for calculating the lboud of assumed-shape arrays - it is usually one, or whatever the user specified as lower bound (if constant). Hello, I've double-checked in the standard, and it seems it is not

[PATCH] PR 65867 - bootstrap fails for mingw32 due to missing header in ssp.c

2015-04-25 Thread daniel . f . starke
Hello, This patch works around a missing include in windows.h (mingw.org) for ssp.c. ChangeLog 2015-04-25 Daniel Starke daniel.f.sta...@freenet.de * libssp/ssp.c: Added wincrypt.h include for Windows targets. Bootstrapped i686-pc-mingw32 (mingw32 version 3.20). Regards, Daniel diff

[Patch] Add regex_constants::__polynomial

2015-04-25 Thread Tim Shen
On Tue, Feb 17, 2015 at 1:54 AM, Jonathan Wakely wrote: On 16/02/15 22:10 +, Tim Shen wrote: Hi Jon, The Thompson NFA algorithm (BFS approach) in libstdc++ regex exists for a while, and I do think we can add it to the standard as a flag regex_constants::syntax_option_type::polynomial,

[Patch, Fortran] Simplify lbound

2015-04-25 Thread Thomas Koenig
Hello world, this is a simplification for calculating the lboud of assumed-shape arrays - it is usually one, or whatever the user specified as lower bound (if constant). The surprising thing was that the current code generated for the array descriptor for subroutine foo(a, b, n, m)

[PATCH][PR65818][bootstrap,hppa] Return side-effect free result in gimplify_va_arg_internal

2015-04-25 Thread Tom de Vries
Hi, this patch fixes PR65818, and hppa bootstrap. When compiling gcc/libiberty/vprintf-support.c, the following va_arg is compiled: ... (void) __builtin_va_arg(ap, double); ... This results in the following ifn_va_arg at gimple level, with a NULL_TREE lhs: ... VA_ARG (ap, 0B); ... We

Re: [Patch, fortran, pr59678, v1] -- [F03] Segfault on equalizing variables of a complex derived type

2015-04-25 Thread Paul Richard Thomas
Dear Andre, The patch is OK with three changes: (i) Put the PR line in the testsuite ChangeLog; (ii) Put the dg-do header information in the testcase, together with lines to say which PR it fixes and who the contributor is; and (iii) Add the testcase for PR65841 since your patch for pr65792

Re: [Patch, fortran, pr59678, v1] -- [F03] Segfault on equalizing variables of a complex derived type

2015-04-25 Thread Paul Richard Thomas
Dear Andre, Sorry, Mikael's patch for pr65792! Also, your patch for PR59678 had better be applied to 5.1 and to 4.9, since bug generates such grossly wrong code. Cheers Paul On 25 April 2015 at 16:42, Paul Richard Thomas paul.richard.tho...@gmail.com wrote: Dear Andre, The patch is OK with

Re: [PATCH, RFC]: Next stage1, refactoring: propagating rtx subclasses

2015-04-25 Thread Richard Sandiford
Thanks for looking at this. Mikhail Maltsev malts...@gmail.com writes: 2. Not all of these type promotions can be done by just looking at function callers and callees (and some functions will only be generated during the build of some rare architecture) and checks already done in them. In a

[PATCH] PRs target/65846/65886: Improve copy reloc in PIE

2015-04-25 Thread H.J. Lu
Normally, with PIE, GCC accesses globals that are extern to the module using GOT. This is two instructions, one to get the address of the global from GOT and the other to get the value. Examples: --- extern int a_glob; int main () { return a_glob; } --- With PIE, the generated code accesses

Re: [Patch, fortran] PR65792 unitialized structure constructor array subcomponent

2015-04-25 Thread Mikael Morin
Dominique reported that the trunk patch breaks class_19.f90 when applied together with Andre's PR59678 fix. It appears to me that even without Andre's patch, the code generated is wrong, and I don't see any easy fix. Thus I'm withdrawing trunk's patch, and propose the backport patch also for