Re: [C++/66270] another may_alias crash

2015-05-25 Thread Jason Merrill
On 05/25/2015 04:55 PM, Nathan Sidwell wrote: This patch addresses 66270, another case where may_alias disrupted the canonical type system. We ICE as TYPE_CANONICALs differ, but comptypes think they are the same. There seems to be a bit of confusion as to whether pointers that differ only in TY

Re: [C++ Patch] Fix 66243, silent cast of scoped enum

2015-05-25 Thread Jason Merrill
On 05/25/2015 04:14 PM, Nathan Sidwell wrote: On 05/25/15 15:43, Jason Merrill wrote: On 05/24/2015 07:20 PM, Nathan Sidwell wrote: - else if (! INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (value))) + else if (! INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P + (TREE_TYPE (value)))

Re: PATCH to run autoconf tests with C++ compiler

2015-05-25 Thread Alexandre Oliva
On May 25, 2015, Alexandre Oliva wrote: > I have one concern about scenarios in which config.cache is shared by > all builds for the host, but in which stage1 and stage2 compilers might > (and arguably should) get different results because of stage1's > -std=c++98, but with a shared config.cache,

Re: Teach gimple_canonical_types_compatible_p about incomplete types

2015-05-25 Thread Jan Hubicka
> On May 25, 2015 1:49:45 AM GMT+02:00, Jan Hubicka wrote: > > > >2 Each enumerated type shall be compatible with char , a signed > >integer > > type, or an unsigned integer type. The choice of type is > >implementation-defined, but shall be capable of representing the > >values > >

[Ada] Issue missing warning for 'Size attribute

2015-05-25 Thread Eric Botcazou
The documentation says that the compiler issues a warning for the 'Size attribute on discrete types if the specified value is larger than 64, but we failed to so for values between 65 and 128. Tested on x86_64-suse-linux, applied on the mainline. 2015-05-25 Eric Botcazou * gcc-inte

[Ada] Minor cleanup in gigi (4/4)

2015-05-25 Thread Eric Botcazou
Tested on x86_64-suse-linux, applied on the mainline. 2015-05-25 Eric Botcazou * get_targ.adb (C_Get_Float_Words_BE): Adjust import name. (C_Get_Words_BE): Likewise. (C_Get_Bytes_BE): Likewise. (C_Get_Bits_BE): Likewise. (Width_From_Size): Remove superf

[Ada] Minor cleanup in gigi (3/4)

2015-05-25 Thread Eric Botcazou
Tested on x86_64-suse-linux, applied on the mainline. 2015-05-25 Eric Botcazou * gcc-interface/decl.c (elaborate_expression): Take a const string suffix instead of a tree. (elaborate_expression_1): Likewise. (elaborate_expression_2): Likewise. (gnat_to_

[Ada] Minor cleanup in gigi (2/4)

2015-05-25 Thread Eric Botcazou
Tested on x86_64-suse-linux, applied on the mainline. 2015-05-25 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_entity) : Move around. : Merge with E_Variable case. : Remove 'object' label. -- Eric BotcazouIndex: gcc-interface/decl.c =

[Ada] Minor cleanup in gigi (1/4)

2015-05-25 Thread Eric Botcazou
Tested on x86_64-suse-linux, applied on the mainline. 2015-05-25 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak. * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT. * gcc-interface/utils.c (convert): Likewise and simplify.

[C++/66270] another may_alias crash

2015-05-25 Thread Nathan Sidwell
This patch addresses 66270, another case where may_alias disrupted the canonical type system. We ICE as TYPE_CANONICALs differ, but comptypes think they are the same. There seems to be a bit of confusion as to whether pointers that differ only in TYPE_REF_CAN_ALIAS_ALL are the same canonical

Re: PATCH to run autoconf tests with C++ compiler

2015-05-25 Thread Alexandre Oliva
On May 22, 2015, Jason Merrill wrote: > * configure.ac: Use C++ for all tests. Use AC_CHECK_DECLS for > strstr and basename. > * configure: Regenerate. This is ok, thanks. I have one concern about scenarios in which config.cache is shared by all builds for the host, but in wh

[Ada] Implementation of new pragma/aspect Volatile_Full_Access

2015-05-25 Thread Eric Botcazou
This is the bulk of the implementation of pragma Volatile_Full_Access. It is piggybacked on the existing support for atomic accesses in gigi and generates the load-modify-store sequences when need be. Tested on x86_64-suse-linux, applied on the mainline. 2015-05-25 Eric Botcazou *

Re: [PATCH c/c++] use explicit locations for some warnings in c-pragma.c

2015-05-25 Thread Manuel López-Ibáñez
On 25 May 2015 at 21:56, Marek Polacek wrote: > Perhaps we should introduce GCC_BAD_LOC with a location_t argument and use it > here. Why would we want to obfuscate code like that? I would propose to actually remove GCC_BAD completely. Manuel.

Re: [C++ Patch] Fix 66243, silent cast of scoped enum

2015-05-25 Thread Nathan Sidwell
On 05/25/15 15:43, Jason Merrill wrote: On 05/24/2015 07:20 PM, Nathan Sidwell wrote: - else if (! INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (value))) + else if (! INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P + (TREE_TYPE (value))) value = perform_implicit_conversion_flag

Re: [PATCH] Don't combine param and return value copies

2015-05-25 Thread Segher Boessenkool
On Mon, May 25, 2015 at 10:26:35AM +0930, Alan Modra wrote: > On Sat, May 23, 2015 at 08:45:23AM -0500, Segher Boessenkool wrote: > > Thanks. Did you see improvements around return as well, or mostly / > > only related to the function start? > > The rlwinm vs. rldicl change was in dwarf2out.c add

Re: [PATCH c/c++] use explicit locations for some warnings in c-pragma.c

2015-05-25 Thread Marek Polacek
On Mon, May 25, 2015 at 06:06:01PM +0200, Manuel López-Ibáñez wrote: >if (token != CPP_NAME) > -GCC_BAD ("missing [error|warning|ignored] after %<#pragma GCC > diagnostic%>"); > +{ > + warning_at (loc, OPT_Wpragmas, > + "missing [error|warning|ignored|push|pop] after

Re: [patch] testsuite enable PIE tests on FreeBSD

2015-05-25 Thread Andreas Tobler
On 25.05.15 14:42, Dominique Dhumieres wrote: Wouldn't it be better to remove the target selector and instead add: /* { dg-require-effective-target pie } */ ... This allows the tests to be run on Darwin and fail because the code generated does not match the scan-assembler: FAIL: gcc.target/i

[C/C++ PATCH] Implement -Wshift-overflow (PR c++/55095)

2015-05-25 Thread Marek Polacek
Not sure how many packages I'll break this time around, so early testing appreciated. The C/C++ standards say that for signed left shift, if E1 x 2^{E2} isn't representable, the behavior is undefined. We didn't have a corresponding warning though, so this patch adds -Wshift-overflow, enabled by d

Re: [C++ Patch] PR 61683

2015-05-25 Thread Jason Merrill
OK, thanks. Jason

Re: [C++ Patch] Fix 66243, silent cast of scoped enum

2015-05-25 Thread Jason Merrill
On 05/24/2015 07:20 PM, Nathan Sidwell wrote: - else if (! INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (value))) + else if (! INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P + (TREE_TYPE (value))) value = perform_implicit_conversion_flags (ENUM_UND

Re: [PATCH c/c++] use explicit locations for some warnings in c-pragma.c

2015-05-25 Thread Jason Merrill
OK. Jason

Re: [C frontend] Fix construction of TYPE_STUB_DECL

2015-05-25 Thread Jason Merrill
Looks good. Jason

Re: [PATCH] Contribute FreeBSD unwind support (x86_64 and x86)

2015-05-25 Thread Andreas Tobler
On 20.05.15 22:21, Andreas Tobler wrote: On 20.05.15 21:49, John Marino wrote: I have maintained unwind support for FreeBSD i386 and x86_64 in my "gnat-aux" repository for many years (I created it). I've always intended on contributing it back to GCC, but I never got around to "proving" it work

[patch] libjava testsuite

2015-05-25 Thread Andreas Tobler
Hi all, the below patch fixes the PR16923.c test case on FreeBSD (amd64/i386). Ok for trunk? Thanks, Andreas 2015-05-25 Andreas Tobler * testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation): Add libiconv for FreeBSD to cxxflags. Index: testsuite/libjava.jni/jni.

Re: debug mode maintenance patch

2015-05-25 Thread Jonathan Wakely
On 25/05/15 15:31 +0200, François Dumont wrote: Hi This is a patch to clean the debug mode code. I have introduced a new debug header, assertions.h, so that headers that only need _GLIBCXX_DEBUG_ASSERT do not have to include the big debug.h. I also introduce functions.tcc to isolate im

Re: [Patch, fortran, PR44672, v6] [F08] ALLOCATE with SOURCE and no array-spec

2015-05-25 Thread Mikael Morin
Le 19/05/2015 12:26, Andre Vehreschild a écrit : > Hi all, > > update based on latest 65548 (v5) patch and current trunk. Description and > issue addressed unchanged (see cite below). > > Bootstrapped and regtested on x86_64-linux-gnu/f21. > > Any volunteers to review? The initial version dates

Re: [PATCH] PR target/66232: -fPIC -fno-plt -mx32 fails to generate indirect branch via GOT

2015-05-25 Thread Alexander Monakov
> On Thu, 21 May 2015, H.J. Lu wrote: > > > On Thu, May 21, 2015 at 12:32 PM, Alexander Monakov > > wrote: > > > On Thu, 21 May 2015, H.J. Lu wrote: > > >> On Thu, May 21, 2015 at 12:06 PM, Richard Henderson > > >> wrote: > > >> > On 05/21/2015 12:01 PM, H.J. Lu wrote: > > >> >> +++ b/gcc/test

Re: [Patch, fortran] PR66079 - [6 Regression] memory leak with source allocation in internal subprogram

2015-05-25 Thread Steve Kargl
On Mon, May 25, 2015 at 07:33:12PM +0200, Mikael Morin wrote: > Le 25/05/2015 09:30, Paul Richard Thomas a ?crit : > > Dear All, > > > > Lets see if I can get it right this time :-) > > > > Note that I have changed the name of the temporary variable in > > trans_allocate from 'atmp' to 'expr3' so

[PATCH, i386]: Fix PR 66274, -m32 emits 64bit register in inline asm

2015-05-25 Thread Uros Bizjak
Hello! IMO, we should introduce mode checks here, but the patch below returns to the functionality as it was before my cleanup. 2015-05-25 Uros Bizjak PR target/66274 * config/i386/i386.c (print_reg): Only print "r" for TARGET_64BIT when LEGACY_INT_REGNO_P is processed. testsuite

Re: [Patch, fortran] PR66079 - [6 Regression] memory leak with source allocation in internal subprogram

2015-05-25 Thread Mikael Morin
hello Andre, Le 25/05/2015 12:24, Andre Vehreschild a écrit : > Hi Paul, > > I am not quite happy with the naming of the temporary variable. When I > initially set the prefix to "atmp" this was because the variable would be an > array most of the time and because of the number appended to it shou

Re: [Patch, fortran] PR66079 - [6 Regression] memory leak with source allocation in internal subprogram

2015-05-25 Thread Mikael Morin
Le 25/05/2015 09:30, Paul Richard Thomas a écrit : > Dear All, > > Lets see if I can get it right this time :-) > > Note that I have changed the name of the temporary variable in > trans_allocate from 'atmp' to 'expr3' so that it is not confused with > array temporaries. I agree with Andre willin

Re: [patch, avr] Restore base register if not marked dead/unused

2015-05-25 Thread Denis Chertykov
2015-05-19 16:04 GMT+03:00 Sivanupandi, Pitchumani : > Test gcc.c-torture/execute/memcpy-bi.c (-O2) failed for attiny40 device. > Cause seems to be in "load from memory" as it is not restoring base > register after load instructions generated. > > Function avr_out_load_psi_reg_no_disp_tiny in avr.c

[PATCH c/c++] use explicit locations for some warnings in c-pragma.c

2015-05-25 Thread Manuel López-Ibáñez
This changes from: pragma-diag-3.c:2:9: warning: missing [error|warning|ignored] after ‘#pragma GCC diagnostic’ [-Wpragmas] #pragma GCC diagnostic /* { dg-warning "24:missing" "missing" { xfail *-*-* } } */ ^ pragma-diag-3.c:4:9: warning: expected [error|warning|ignored|push|pop] after ‘

Re: Teach gimple_canonical_types_compatible_p about incomplete types

2015-05-25 Thread Bernhard Reutner-Fischer
On May 25, 2015 1:49:45 AM GMT+02:00, Jan Hubicka wrote: >2 Each enumerated type shall be compatible with char , a signed >integer > type, or an unsigned integer type. The choice of type is >implementation-defined, but shall be capable of representing the >values > of all the members

[Ada] Cleanup in renaming support

2015-05-25 Thread Eric Botcazou
This is in preparation for the upcoming reimplementation. Tested on x86_64-suse-linux, applied on the mainline. 2015-05-25 Eric Botcazou * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into... (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this. * gcc-interface/

[committed] Trivial cleanup in ubsan_instrument_shift

2015-05-25 Thread Marek Polacek
While looking at something else I noticed that I should have used type0 here. Bootstrapped/regtested on x86_64-linux, applying to trunk. 2015-05-25 Marek Polacek * c-ubsan.c (ubsan_instrument_shift): Use type0. --- gcc/c-family/c-ubsan.c +++ gcc/c-family/c-ubsan.c @@ -173,7 +173,7 @@

debug mode maintenance patch

2015-05-25 Thread François Dumont
Hi This is a patch to clean the debug mode code. I have introduced a new debug header, assertions.h, so that headers that only need _GLIBCXX_DEBUG_ASSERT do not have to include the big debug.h. I also introduce functions.tcc to isolate implementation of __foreign_iterator which requir

Re: [patch] testsuite enable PIE tests on FreeBSD

2015-05-25 Thread Dominique Dhumieres
> Wouldn't it be better to remove the target selector and instead add: > > /* { dg-require-effective-target pie } */ > ... This allows the tests to be run on Darwin and fail because the code generated does not match the scan-assembler: FAIL: gcc.target/i386/iinline-attr-2.c scan-assembler p2alig

[Ada] Improve performance of writable actuals aliasing detection

2015-05-25 Thread Arnaud Charlet
This patch improves the performance of the frontend machinery which detects dangerous order dependencies caused by out-mode parameters of Ada 2012 functions (AI05-0144). Tested on x86_64-pc-linux-gnu, committed on trunk 2015-05-25 Javier Miranda * einfo.ads, einfo.adb (Has_Out_Or_In_O

Re: [PATCH 14/14][ARM/AArch64 testsuite] Test float16_t vcvt_* intrinsics

2015-05-25 Thread Christophe Lyon
On 22 April 2015 at 19:38, Alan Lawrence wrote: > This adds a test of vcvt_f32_f16 and vcvt_f16_f32, also vcvt_high_f32_f16 > and vcvt_high_f16_f32. > > On ARM, we pass additional option -mfpu=neon-fp16 to the compiler (possible > following patch 2/3). The compiler is already receiving an option s

Re: [PATCH 13/14][ARM/AArch64 testsuite] Use gcc-dg-runtest in advsimd-intrinsics.exp

2015-05-25 Thread Christophe Lyon
On 22 April 2015 at 19:36, Alan Lawrence wrote: > In the first revision of Christophe Lyon's advsimd-intrinsics tests, > https://gcc.gnu.org/ml/gcc-patches/2014-06/msg00532.html , both > gcc-dg-runtest (to assemble only) and c-torture-execute were used. In review > the gcc-dg-runtest part was then

Re: [PATCH 12/14][ARM/AArch64 Testsuite] Update advsimd-intrinsics tests to add float16 vectors

2015-05-25 Thread Christophe Lyon
On 22 April 2015 at 19:31, Alan Lawrence wrote: > This is a fairly straightforward addition of a new type: I've added it in on > equal status to the other types, because the various > vector-load/store/element-manipulating intrinsics, are *not* conditional on > HW support. (They just involve movin

Re: Simplify -x<0 to x>0

2015-05-25 Thread Marc Glisse
On Mon, 25 May 2015, Eric Botcazou wrote: I noticed we were only doing this transformation for floats and not for integers, so I took the chance to move it to match.pd. Isn't it so because this requires a symmetrical domain around 0? With undefined overflow, by computing -x, you are assertin

Re: Simplify -x<0 to x>0

2015-05-25 Thread Eric Botcazou
> I noticed we were only doing this transformation for floats and not for > integers, so I took the chance to move it to match.pd. Isn't it so because this requires a symmetrical domain around 0? -- Eric Botcazou

Re: [Patch, fortran] PR66079 - [6 Regression] memory leak with source allocation in internal subprogram

2015-05-25 Thread Andre Vehreschild
Hi Paul, I am not quite happy with the naming of the temporary variable. When I initially set the prefix to "atmp" this was because the variable would be an array most of the time and because of the number appended to it should be unique anyway. However I would like to point out that disclosing an

Re: [patch] testsuite enable PIE tests on FreeBSD

2015-05-25 Thread Andreas Tobler
On 22.05.15 23:47, Jeff Law wrote: On 05/21/2015 02:01 PM, Andreas Tobler wrote: On 21.05.15 20:14, Andreas Tobler wrote: On 20.05.15 22:30, Jeff Law wrote: On 05/20/2015 11:04 AM, Andreas Tobler wrote: Hi, the attached patch enables some PIE tests on FreeBSD. Ok for trunk? Thanks, Andreas

[wwwdocs] Update changes.html

2015-05-25 Thread Marek Polacek
I've committed the following update to reflect the recent addition. Index: changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/changes.html,v retrieving revision 1.7 diff -u -r1.7 changes.html --- changes.html14 May 2015

Re: [Patch, fortran] PR66079 - [6 Regression] memory leak with source allocation in internal subprogram

2015-05-25 Thread Paul Richard Thomas
Dear All, Lets see if I can get it right this time :-) Note that I have changed the name of the temporary variable in trans_allocate from 'atmp' to 'expr3' so that it is not confused with array temporaries. I am not suree how much of the testcase is pertinent after the reform of the evaluation of