[Bug target/66824] -miamcu doesn't load FP constant into register directly

2015-07-17 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66824

--- Comment #3 from uros at gcc dot gnu.org ---
Author: uros
Date: Fri Jul 17 07:02:29 2015
New Revision: 225919

URL: https://gcc.gnu.org/viewcvs?rev=225919&root=gcc&view=rev
Log:
PR target/66824
* config/i386/i386.h (TARGET_HARD_SF_REGS): New define.
(TARGET_HARD_DF_REGS): Ditto.
(TARGET_HARD_XF_REGS): Ditto.
* config/i386/i386.md (*movxf_internal): Add alternatives 9 and 10.
Enable alternatives 9 and 10 only for !TARGET_HARD_XF_REG target.
(*movdf_internal): Add alternatives 22, 23, 24 and 25. Enable
alternatives 22, 23, 24 and 25 only for !TARGET_HARD_DF_REG target.
(*movsf_internal): Add alternatives 16 and 17. Enable
alternatives 16 and 17 only for !TARGET_HARD_SF_REG target.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.h
trunk/gcc/config/i386/i386.md


[Bug inline-asm/49611] Inline asm should support input/output of flags

2015-07-17 Thread gcc.hall at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49611

--- Comment #12 from Jeremy  ---
Hi David,
That's very interesting.  Its not in gcc 5.2.0 released yesterday though.
It probably does a setcc on x86 which doesn't really gain much, but on ARM
it could be useful.
More useful (as of gcc 5.0) is the new __builtin_xxx_overflow which uses
the overflow flag directly.   So for int16_t  operands for example:
if(   __builtin_add_overflow( a, b, &result)  )
 printf( "overflow");
it would emit "addw; jno".

Jeremy



On 17 July 2015 at 06:41, gccbugzilla at limegreensocks dot com <
gcc-bugzi...@gcc.gnu.org> wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49611
>
> --- Comment #11 from David  ---
> Apparently this feature has been checked in:
> https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#FlagOutputOperands
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>


[Bug c/66903] New: The gcc 4.9.2 crashes when processing declarations such as: int (( ... (x) ... ))

2015-07-17 Thread speirofr at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66903

Bug ID: 66903
   Summary: The gcc 4.9.2 crashes when processing declarations
such as: int (( ... (x) ... ))
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: speirofr at gmail dot com
  Target Milestone: ---

The gcc 4.9.2 crashes when processing declarations such as: int (( ... (x) ...
)), with the number of parens > 400.


[Bug c/66903] The gcc 4.9.2 crashes when processing declarations such as: int (( ... (x) ... ))

2015-07-17 Thread speirofr at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66903

--- Comment #1 from Salva Peiró  ---
Created attachment 36001
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36001&action=edit
parens.i: Preprocesed sourced with gcc -v -save-temps

[Bug go/66904] New: cmd/go: "#cgo pkg-config:" comments do not work with gccgo

2015-07-17 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66904

Bug ID: 66904
   Summary: cmd/go: "#cgo pkg-config:" comments do not work with
gccgo
   Product: gcc
   Version: 5.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: go
  Assignee: ian at airs dot com
  Reporter: doko at gcc dot gnu.org
CC: cmang at google dot com
  Target Milestone: ---

see https://github.com/golang/go/issues/11739


[Bug c/66903] The gcc 4.9.2 crashes when processing declarations such as: int (( ... (x) ... ))

2015-07-17 Thread speirofr at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66903

--- Comment #2 from Salva Peiró  ---

$ gcc parens.c 
gcc: internal compiler error: Segmentation fault (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10'
--with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10)

[Bug c++/66901] Segmentation fault in compiler instead of error message for ill-formed program with namespace alias and qualified definition

2015-07-17 Thread miyuki at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66901

Mikhail Maltsev  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 CC||miyuki at gcc dot gnu.org
  Known to fail||6.0

--- Comment #1 from Mikhail Maltsev  ---
Reproduces on trunk. Possibly a dup of PR66878 (also caused by infinite
recursion in push_inner_scope_r).


[Bug libstdc++/62258] [4.9/5 Regression] uncaught_exception() equals to `true' after rethrow_exception()

2015-07-17 Thread D.Bahadir at GMX dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62258

--- Comment #17 from Deniz Bahadir  ---
Did this fix make it into the latest GCC 5.2.0 release?


[Bug libstdc++/66902] _S_debug_messages is unneccessary public

2015-07-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66902

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-07-17
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
The symbol is not exported on targets using a linker script for symbol
versioning (GNU, Solaris, possibly Windows), so I see no reason we can't make
that true for all targets.


[Bug fortran/61831] [4.9/ 5 Regression] runtime error: pointer being freed was not allocated

2015-07-17 Thread mikael at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61831

--- Comment #49 from Mikael Morin  ---
Author: mikael
Date: Fri Jul 17 09:40:29 2015
New Revision: 225926

URL: https://gcc.gnu.org/viewcvs?rev=225926&root=gcc&view=rev
Log:
Fix PR61831: Side-effect variable component deallocation

gcc/fortran/
2015-07-17  Mikael Morin  
Dominique d'Humieres  

PR fortran/61831
* trans-array.c (gfc_conv_array_parameter): Guard allocatable
component deallocation code generation with descriptorless
calling convention flag.
* trans-expr.c (gfc_conv_expr_reference): Remove allocatable
component deallocation code generation from revision 212329.
(expr_may_alias_variables): New function.
(gfc_conv_procedure_call): New boolean elemental_proc to factor
check for procedure elemental-ness.  Rename boolean f to nodesc_arg
and declare it in the outer scope.  Use expr_may_alias_variables,
elemental_proc and nodesc_arg to decide whether generate allocatable
component deallocation code.
(gfc_trans_subarray_assign): Set deep copy flag.

gcc/testsuite/
2015-07-17  Mikael Morin  

PR fortran/61831
* gfortran.dg/alloc_comp_auto_array_3.f90: Count the number
of generated while loops in the tree dump.
* gfortran.dg/derived_constructor_components_6.f90: New file.


Added:
trunk/gcc/testsuite/gfortran.dg/derived_constructor_comps_6.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/alloc_comp_auto_array_3.f90


[Bug go/66870] split stack issues on ppc64le and ppc64

2015-07-17 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66870

--- Comment #11 from Alan Modra  ---
I can reproduce the fail.  It is caused by shrink-wrapping.


[Bug ada/66837] Non-Native Default_Scalar_Storage_Order Breaks Enum'Image

2015-07-17 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66837

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-07-17
 CC||ebotcazou at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Eric Botcazou  ---
Confirmed, pragma Default_Scalar_Storage_Order needs to be fixed.


[Bug driver/66732] ISL 0.15 released, has breaking changes to gcc

2015-07-17 Thread timo.gurr at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66732

Timo Gurr  changed:

   What|Removed |Added

 CC||timo.gurr at gmail dot com

--- Comment #1 from Timo Gurr  ---
Mike Frysinger sent a patch allowing GCC to build with ISL 0.15 to the
gcc-patches mailing list:
https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01162.html
and he provides patches (for Gentoo) for GCC 4.9.3 and 5.1.0:
https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.3/gentoo/75_all_gcc-4.9-isl-0.15.patch?revision=1.1
https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gcc/5.1.0/gentoo/75_all_gcc5-isl-0.15.patch?revision=1.1


[Bug fortran/66035] [5/6 Regression] gfortran ICE segfault

2015-07-17 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66035

--- Comment #6 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Fri Jul 17 10:16:21 2015
New Revision: 225928

URL: https://gcc.gnu.org/viewcvs?rev=225928&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2015-07-17  Andre Vehreschild  

PR fortran/66035
* trans-expr.c (alloc_scalar_allocatable_for_subcomponent_assignment):
Compute the size to allocate for class and derived type objects
correclty.
(gfc_trans_subcomponent_assign): Only allocate memory for a
component when the object to assign is not an allocatable class
object (the memory is already present for allocatable class objects).
Furthermore use copy_class_to_class for assigning the rhs to the
component (may happen for dummy class objects on the rhs).


gcc/testsuite/ChangeLog:

2015-07-17  Andre Vehreschild  

PR fortran/66035
* gfortran.dg/structure_constructor_13.f03: New test.



Added:
trunk/gcc/testsuite/gfortran.dg/structure_constructor_13.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog


[Bug target/66905] New: SSE not enabled for -march=pentium4

2015-07-17 Thread michael.finn.jorgensen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66905

Bug ID: 66905
   Summary: SSE not enabled for -march=pentium4
   Product: gcc
   Version: 4.8.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: michael.finn.jorgensen at gmail dot com
  Target Milestone: ---

The command:

gcc -c -Q -march=pentium4 --help=target

outputs (amoung other stuff):

-msse   [disabled]

But I expected the output to show that SSE is enabled. According to the manual
at
https://gcc.gnu.org/onlinedocs/gcc-4.8.3/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options
the pentium4 processor supports SSE.

The same problem occurs when using -march=native, with my CPU (which is a
Pentium 4).

I would expect GCC to automatically enable all the features specific for the
CPU model, when using the -march option.


[Bug target/66906] New: [4.9/5/6] gcc.dg/torture/stackalign/nested-1.c fails on ICE with -O0 -m32 -mregparm=3

2015-07-17 Thread julia.koval at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66906

Bug ID: 66906
   Summary: [4.9/5/6] gcc.dg/torture/stackalign/nested-1.c fails
on ICE with -O0 -m32 -mregparm=3
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: julia.koval at intel dot com
  Target Milestone: ---

reprodoce:
gcc -O0 -m32 -mregparm=3 nested-1.c

/gcc/gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c: In function ‘bar’:
/gcc/gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c:31:5: internal compiler
error: in ix86_expand_prologue, at config/i386/i386.c:11690
 }
 ^
0xe85065 ix86_expand_prologue()
.././../TRUNK/gcc/gcc/config/i386/i386.c:11690
0xf66e7a gen_prologue()
.././../TRUNK/gcc/gcc/config/i386/i386.md:12114
0xe6c008 target_gen_prologue
.././../TRUNK/gcc/gcc/config/i386/i386.md:18144
0x8532bc thread_prologue_and_epilogue_insns()
.././../TRUNK/gcc/gcc/function.c:5845
0x853d72 rest_of_handle_thread_prologue_and_epilogue
.././../TRUNK/gcc/gcc/function.c:6398
0x853d72 execute
.././../TRUNK/gcc/gcc/function.c:6436

[Bug target/66905] SSE not enabled for -march=pentium4

2015-07-17 Thread michael.finn.jorgensen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66905

--- Comment #1 from Michael Jørgensen  
---
The same problem appears on a 64-bit system:

Linux granbo-3 4.0.4-303.fc22.x86_64 #1 SMP Thu May 28 12:37:06 UTC 2015 x86_64
x86_64 x86_64 GNU/Linux

using:

gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)

[Bug fortran/66907] New: Correct code produces "Segmentation fault - invalid memory reference"

2015-07-17 Thread mrestelli at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66907

Bug ID: 66907
   Summary: Correct code produces "Segmentation fault - invalid
memory reference"
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mrestelli at gmail dot com
  Target Milestone: ---

The attached code compiles with gfortran and produces an error at
runtime. As far as I can see, the code is correct. Unfortunately, I
have been unable to reduce the test further; if I try, the problem
disappears.


$ gfortran gft.f90 -g -O0 -o gft
$ ./gft 

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7F281A1F6757
#1  0x7F281A1F6D5E
#2  0x7F281972EE8F
#3  0x400A15 in __mod_a_MOD_mult at gft.f90:67
#4  0x400F44 in __mod_a_MOD_check_t_b at gft.f90:38 (discriminator 2)
#5  0x401160 in test at gft.f90:84 (discriminator 2)
Speicherzugriffsfehler

$ gfortran --version
GNU Fortran (GCC) 6.0.0 20150715 (experimental)
Copyright (C) 2015 Free Software Foundation, Inc.


The correct behaviour should be

$ ./gft 
 p(1):1
 p(2):1


I can see the same problem also with versions 5.1.0 and 4.9.2.




module mod_a

 implicit none

 type t_a
   integer :: i
 end type t_a

 type :: t_b
  type(t_a), allocatable :: dat(:)
 end type t_b

 interface assignment(=)
   module procedure real2t_b
 end interface

 interface operator(**)
   module procedure pow
 end interface

 interface operator(*)
   module procedure mult
 end interface

contains

 pure recursive function check_t_b(d) result(b)
  integer, intent(in) :: d
  type(t_b) :: b(2)

  type(t_b) :: xd

   xd = 1.0

   if(d.eq.1) then
 b = 1.0
   else
 b = (xd**0)*check_t_b(1)
   endif

 end function check_t_b

 elemental subroutine real2t_b(p,x)
  type(t_b), intent(out) :: p
  real, intent(in) :: x

   allocate(p%dat(1))
   p%dat%i = 1.0

 end subroutine real2t_b

 elemental function pow(p,n) result(q)
  type(t_b) :: q
  type(t_b), intent(in) :: p
  integer, intent(in) :: n

   q = 1.0

 end function pow

 elemental function mult(p1,p2) result(p)
  type(t_b), intent(in) :: p1,p2
  type(t_b) :: p

  type(t_a) :: p1_dat

   p1_dat = p1%dat(1)
   p = 1.0

 end function mult

end module mod_a

!---

program test

 use mod_a

 implicit none

 type(t_b) :: p(2)

  p = check_t_b( 2 )

  write(*,*) "p(1): ", p(1)%dat%i
  write(*,*) "p(2): ", p(2)%dat%i

end program test


[Bug sanitizer/66908] New: Uninitialized variable when compiled with UBsan

2015-07-17 Thread m.guseva at samsung dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66908

Bug ID: 66908
   Summary: Uninitialized variable when compiled with UBsan
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: sanitizer
  Assignee: unassigned at gcc dot gnu.org
  Reporter: m.guseva at samsung dot com
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
  Target Milestone: ---

Created attachment 36002
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36002&action=edit
Reproducer

When compiled with "-fsanitize=shift,bounds" the gcc reports that "i" variable
maybe uninitialized:
gcc  -O2  -fsanitize=shift,bounds -std=gnu89 -Werror=maybe-uninitialized -c
testcase.c
testcase.c: In function Б─≤fooБ─≥:
testcase.c:21:36: error: Б─≤i.1Б─≥ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
 res[i] = ((data->scale[i] + tab[i]) << mult);

It's not true in original source code however in produced gimple the "i.1" is
initialized in  block but may be used in block :
 23   if (mult.0 > 31) goto ; else goto ;
 24   :
 25   D.3011 = (unsigned long) mult.0;
 26   D.3012 = data->scale[i];
 27   D.3013 = (int) D.3012;
 28   i.1 = i;
 29   UBSAN_BOUNDS (0B, i.1, 21);
 30   D.3015 = tab[i.1];
 31   D.3016 = (int) D.3015;
 32   D.3017 = D.3013 + D.3016;
 33   D.3018 = (unsigned long) D.3017;
 34   __builtin___ubsan_handle_shift_out_of_bounds (&*.Lubsan_data0, D.3018,
D.3011);
 35   goto ;
 36   :
 37   :
 38   D.3020 = (long unsigned int) i;
 39   D.3021 = D.3020 * 4;
 40   D.3022 = res + D.3021;
 41   D.3012 = data->scale[i];
 42   D.3013 = (int) D.3012;
 43   UBSAN_BOUNDS (0B, i.1, 21);

Discovered in gcc 4.9.2, reproduced on trunk with "-std=gnu89".

[Bug inline-asm/30527] Use of input/output operands in __asm__ templates not fully documented

2015-07-17 Thread davmac at davmac dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30527

--- Comment #4 from Davin McCall  ---
I recently stumbled across section 6.43.2.7 of the manual, which does in fact
document the operand modifiers for (and only for) x86. Modifiers for other
architectures are not documented.


[Bug inline-asm/49611] Inline asm should support input/output of flags

2015-07-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49611

--- Comment #13 from Andrew Pinski  ---
(In reply to Jeremy from comment #12)
> Hi David,
> That's very interesting.  Its not in gcc 5.2.0 released yesterday though.

That is because 5.2 is a patch release off of the 5 branch. It was added to gcc
6 and above. 

> It probably does a setcc on x86 which doesn't really gain much, but on ARM
> it could be useful.
> More useful (as of gcc 5.0) is the new __builtin_xxx_overflow which uses
> the overflow flag directly.   So for int16_t  operands for example:
> if(   __builtin_add_overflow( a, b, &result)  )
>  printf( "overflow");
> it would emit "addw; jno".
> 
> Jeremy
> 
> 
> 
> On 17 July 2015 at 06:41, gccbugzilla at limegreensocks dot com <
> gcc-bugzi...@gcc.gnu.org> wrote:
> 
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49611
> >
> > --- Comment #11 from David  ---
> > Apparently this feature has been checked in:
> > https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#FlagOutputOperands
> >
> > --
> > You are receiving this mail because:
> > You are on the CC list for the bug.
> >


[Bug libstdc++/58265] [lwg/2063] std::string move assignment should be noexcept

2015-07-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58265

Jonathan Wakely  changed:

   What|Removed |Added

 Status|SUSPENDED   |ASSIGNED
   Assignee|paolo.carlini at oracle dot com|redi at gcc dot gnu.org

--- Comment #8 from Jonathan Wakely  ---
I've been working on LWG2063 but forgot there was this PR for it.


[Bug target/66824] -miamcu doesn't load FP constant into register directly

2015-07-17 Thread hjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66824

--- Comment #4 from hjl at gcc dot gnu.org  ---
Author: hjl
Date: Fri Jul 17 11:52:09 2015
New Revision: 225929

URL: https://gcc.gnu.org/viewcvs?rev=225929&root=gcc&view=rev
Log:
Add a testcase for PR target/66824

PR target/66824
* gcc.target/i386/pr66824.c:

Added:
trunk/gcc/testsuite/gcc.target/i386/pr66824.c
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug target/66906] [4.9/5/6] gcc.dg/torture/stackalign/nested-1.c fails on ICE with -O0 -m32 -mregparm=3 or -miamcu

2015-07-17 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66906

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-07-17
Summary|[4.9/5/6]   |[4.9/5/6]
   |gcc.dg/torture/stackalign/n |gcc.dg/torture/stackalign/n
   |ested-1.c fails on ICE with |ested-1.c fails on ICE with
   |-O0 -m32 -mregparm=3|-O0 -m32 -mregparm=3 or
   ||-miamcu
 Ever confirmed|0   |1

--- Comment #1 from H.J. Lu  ---
Static chain on stack never worked with -mregparm=3 -m32.


[Bug go/66870] split stack issues on ppc64le and ppc64

2015-07-17 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66870

--- Comment #12 from Alan Modra  ---
Created attachment 36003
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36003&action=edit
fix shrink-wrap issue

The attached patch cures the shrink wrap problem.  I haven't yet bootstrapped
it but fmt.o looks good by inspection.


[Bug c/66909] New: Internal Compiler Error when #including files from /sys on Linux

2015-07-17 Thread nate at natecraun dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66909

Bug ID: 66909
   Summary: Internal Compiler Error when #including files from
/sys on Linux
   Product: gcc
   Version: 5.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: nate at natecraun dot net
  Target Milestone: ---

Hello,

I have encountered a bug where #including files from /sys causes gcc to have an
internal compiler error:

In file included from bug.c:1:0:

bug.c:1:0: internal compiler error: Aborted
 #include "/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size"
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


Ths seems to cause an abort on gcc 5.1.1 and a segfault on gcc 4.8. Clang
manages to #include the file, but produces about 4000 some warnings about null
characters, so this might be a hint about what's going wrong.

Now of course I don't think there is any practical reason to #include files
from /sys. But it still shouldn't cause a compiler crash.

The bug can be reproduced with a source file #including any file from /sys

For example:

bug.c:

#include "/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size"


Here is the .i file.

bug.i:

# 1 "bug.c"
# 1 ""
# 1 ""
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "" 2
# 1 "bug.c"

Here is gcc -v:

Using built-in specs.
COLLECT_GCC=/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/5.1.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --enable-multilib
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-linker-build-id
--with-linker-hash-style=gnu --enable-plugin --enable-initfini-array
--disable-libgcj --with-default-libstdcxx-abi=c++98 --with-isl --enable-libmpx
--enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux
Thread model: posix
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC) 


My uname -a:

Linux localhost.localdomain 4.0.6-300.fc22.x86_64 #1 SMP Tue Jun 23 13:58:53
UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


[Bug fortran/66910] New: allocatable character in derived type gives segfault

2015-07-17 Thread pascal22p at parois dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66910

Bug ID: 66910
   Summary: allocatable character in derived type gives segfault
   Product: gcc
   Version: 5.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pascal22p at parois dot net
  Target Milestone: ---

Created attachment 36004
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36004&action=edit
test case

Hi,

This bug report is following up with a discussion on comp.lang.fortran.
https://groups.google.com/forum/#!topic/comp.lang.fortran/H9o5iJvsM2k

The test case attached gives a segfault:
Program received signal SIGSEGV, Segmentation fault.
0x0040213b in g_mod::env_table_add (key='tr2', valeur='rr', _key=3,
_valeur=2) at f.f90:26
26  environment_table(size(temp)+1)%key=key

It was compiled with GNU Fortran (GCC) version 5.1.0
(x86_64-unknown-linux-gnu):
gfortran51 -fcheck=all -g -gdwarf-3 f.f90 -o truc

The program is a very basic dictionary and fail on the insertion of a second
value. A workaround using source allocation can be used.

It looks similar to:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65841

Regards,
Pascal


[Bug c/66909] Internal Compiler Error when #including files from /sys on Linux

2015-07-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66909

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-07-17
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed.


[Bug fortran/66911] New: ICE on allocate character with source as a derived type component

2015-07-17 Thread pascal22p at parois dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911

Bug ID: 66911
   Summary: ICE on allocate character with source as a derived
type component
   Product: gcc
   Version: 5.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pascal22p at parois dot net
  Target Milestone: ---

Created attachment 36005
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36005&action=edit
test case

Hi,

gcc 5.1.0 gives an ICE on the test case attached. gcc 4.9.0 compiles it but
gives the wrong answer.
a character is allocated using a character allocatable inside a derived type as
a source.

[]$ gfortran51 -fcheck=all -g f.f90 -o test
f.f90:15:0:

 allocate(s, source=environment_table(1)%key)
 1
internal compiler error: in gfc_trans_allocate, at fortran/trans-stmt.c:5291
0x6fe2bd gfc_trans_allocate(gfc_code*)
../../gcc/fortran/trans-stmt.c:5291
0x69dc17 trans_code
../../gcc/fortran/trans.c:1820
0x6bd833 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:5841
0x65bb30 translate_all_program_units
../../gcc/fortran/parse.c:5341
0x65bb30 gfc_parse_file()
../../gcc/fortran/parse.c:5538
0x69afe5 gfc_be_parse_file
../../gcc/fortran/f95-lang.c:228
Please submit a full bug report,
with preprocessed source if appropriate.

Regards,
Pascal


[Bug rtl-optimization/66838] [5 Regression] Calling multiple SYSV AMD64 ABI functions from MS x64 ABI one results in clobbered parameters

2015-07-17 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66838

--- Comment #7 from uros at gcc dot gnu.org ---
Author: uros
Date: Fri Jul 17 13:50:38 2015
New Revision: 225935

URL: https://gcc.gnu.org/viewcvs?rev=225935&root=gcc&view=rev
Log:
Backport from mainline:
2015-07-15  Uros Bizjak  

PR rtl-optimization/66838
* postreload.c (reload_cse_move2add): Also process
CALL_INSN_FUNCTION_USAGE when resetting information of
call-clobbered registers.

testsuite/ChangeLog:

Backport from mainline:
2015-07-15  Uros Bizjak  

PR rtl-optimization/66838
* gcc.target/i386/pr66838.c: New test.


Added:
branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/pr66838.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/postreload.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog


[Bug target/66912] New: Copy relocation against protected symbol doesn't work

2015-07-17 Thread nsz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66912

Bug ID: 66912
   Summary: Copy relocation against protected symbol doesn't work
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: nsz at gcc dot gnu.org
  Target Milestone: ---

same as bug 65248 but for arm and aarch64.

On aarch64, gcc -S -O -fpic compiles

__attribute__((visibility("protected"))) int n;
int f () { return n; }

into

f:
adrpx0, n
ldr w0, [x0, #:lo12:n]
ret
.size   f, .-f
.protected  n
.comm   n,4,4

so the address of n is not loaded from GOT,
which means copy reloc against it in the main
executable won't work.

The expected code is

f:
adrpx0, :got:n
ldr x0, [x0, #:got_lo12:n]
ldr w0, [x0]
ret


[Bug target/66906] [4.9/5/6] gcc.dg/torture/stackalign/nested-1.c fails on ICE with -O0 -m32 -mregparm=3 or -miamcu

2015-07-17 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66906

--- Comment #2 from H.J. Lu  ---
This avoids ICE, but executable crashes:

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 0551a75..47b4f06 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -11643,7 +11643,9 @@ ix86_expand_prologue (void)

   /* For the purposes of frame and register save area addressing,
we've started over with a new frame.  */
-  m->fs.sp_offset = INCOMING_FRAME_SP_OFFSET;
+  m->fs.sp_offset = (INCOMING_FRAME_SP_OFFSET
+ + (ix86_static_chain_on_stack
+? UNITS_PER_WORD : 0));
   m->fs.realigned = true;
 }


[Bug driver/47785] GCC with -flto does not pass options to the assembler

2015-07-17 Thread ray.kinsella at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47785

Ray Kinsella  changed:

   What|Removed |Added

 CC||ray.kinsella at intel dot com

--- Comment #6 from Ray Kinsella  ---
Confirmed as still not fixed in 4.9.1 (with Yocto 1.8)


[Bug jit/66913] New: jit: missing error-checking that value fits in type for gcc_jit_context_new_rvalue_from_ API entrypoints

2015-07-17 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66913

Bug ID: 66913
   Summary: jit: missing error-checking that value fits in type
for gcc_jit_context_new_rvalue_from_ API entrypoints
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: jit
  Assignee: dmalcolm at gcc dot gnu.org
  Reporter: dmalcolm at gcc dot gnu.org
  Target Milestone: ---

As noted here:
  https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01520.html

> This is probably out-of-scope for this patch, but seeing this made me
> wonder if we ought to add a validation to the various
> "new_rvalue_from_TYPE" APIs to ensure that the host value will fit in
> the target type, and emit an error on the context if the given host
> value won't fit.

Filing in BZ for now.


[Bug rtl-optimization/66838] [5 Regression] Calling multiple SYSV AMD64 ABI functions from MS x64 ABI one results in clobbered parameters

2015-07-17 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66838

Uroš Bizjak  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Uroš Bizjak  ---
Fixed.

[Bug rtl-optimization/66865] [6 Regression] wine64 segfaults from gcc in trunk (r225757) (regression)

2015-07-17 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66865

Uroš Bizjak  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2015-07-17
 CC||ubizjak at gmail dot com
 Ever confirmed|0   |1

--- Comment #14 from Uroš Bizjak  ---
Can you please retry now that PR 66782 and PR 66838 are both fixed on mainline
and gcc-5 branch?

[Bug c++/66914] New: incorrect template partial ordering prefers non-member function instead of being ambiguous

2015-07-17 Thread barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66914

Bug ID: 66914
   Summary: incorrect template partial ordering prefers non-member
function instead of being ambiguous
   Product: gcc
   Version: 5.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: barry.revzin at gmail dot com
  Target Milestone: ---

The following code:

#include 

template 
struct A {
template 
void operator+(T const&) { 
std::cout << "member\n"; 
}
};

template 
void operator+(A&, int const& ) { 
std::cout << "free\n"; 
}

int main()
{
A a;
a + 2;
}

compiles and prints "free". It should be ambiguous as neither function template
is more specialized than the other.


[Bug target/66905] SSE not enabled for -march=pentium4

2015-07-17 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66905

--- Comment #2 from H.J. Lu  ---
ISAs are disabled by default. x86 backend will enable them later.


[Bug target/66824] -miamcu doesn't load FP constant into register directly

2015-07-17 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66824

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from H.J. Lu  ---
Fixed.


[Bug target/66906] [4.9/5/6] gcc.dg/torture/stackalign/nested-1.c fails on ICE with -O0 -m32 -mregparm=3 or -miamcu

2015-07-17 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66906

--- Comment #3 from H.J. Lu  ---
We fail to account static chain on stack with stack alignment.


[Bug c++/53499] Incorrect partial ordering result with member vs non-member

2015-07-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53499

Jonathan Wakely  changed:

   What|Removed |Added

 CC||barry.revzin at gmail dot com

--- Comment #2 from Jonathan Wakely  ---
*** Bug 66914 has been marked as a duplicate of this bug. ***


[Bug c++/66914] incorrect template partial ordering prefers non-member function instead of being ambiguous

2015-07-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66914

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||accepts-invalid
 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Jonathan Wakely  ---
EDG and Clang both reject it as ambiguous.

Looks like a dup of PR 53499

Reduced:

extern "C" int puts(const char*);

template 
struct A {
template 
void operator+(T const&) { 
puts("member\n");
}
};

template 
void operator+(A&, int const& ) { 
puts("free\n");
}

int main()
{
A a;
a + 2;
}

*** This bug has been marked as a duplicate of bug 53499 ***


[Bug c++/53499] Incorrect partial ordering result with member vs non-member

2015-07-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53499

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||accepts-invalid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-07-17
 Ever confirmed|0   |1


[Bug target/66814] ICE: gcc.target/i386/avx512f-klogic-2.c

2015-07-17 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66814

--- Comment #5 from uros at gcc dot gnu.org ---
Author: uros
Date: Fri Jul 17 16:27:58 2015
New Revision: 225940

URL: https://gcc.gnu.org/viewcvs?rev=225940&root=gcc&view=rev
Log:
Backport from mainline:
2015-07-10  Uros Bizjak  

* config/i386/sse.md (movdi_to_sse): Use gen_lowpart
and gen_higpart instead of gen_rtx_SUBREG.
* config/i386/i386.md
(floatdi2_i387_with_xmm splitter): Ditto.
(read-modify peephole2): Use gen_lowpart instead of
gen_rtx_SUBREG for operand 5.

Backport from mainline:
2015-07-08  Uros Bizjak  

PR target/66814
* config/i386/predicates.md (nonimmediate_gr_operand): New predicate.
* config/i386/i386.md (not peephole2): Use nonimmediate_gr_operand.
(varous peephole2s): Use {GENERAL,SSE,MMX}_REGNO_P instead of
{GENERAL,SSE,MMX}_REG_P where appropriate.

testsuite/ChangeLog:

Backport from mainline:
2015-07-09  Uros Bizjak  

PR target/66814
* gcc.target/i386/pr66814.c: New test.


Added:
branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/pr66814.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/config/i386/i386.md
branches/gcc-5-branch/gcc/config/i386/predicates.md
branches/gcc-5-branch/gcc/config/i386/sse.md
branches/gcc-5-branch/gcc/testsuite/ChangeLog


[Bug target/66703] [4.9/5/6] gcc.target/i386/readeflags-1.c aborts on -march=i586 or on -miamcu

2015-07-17 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66703

--- Comment #7 from uros at gcc dot gnu.org ---
Author: uros
Date: Fri Jul 17 16:30:53 2015
New Revision: 225941

URL: https://gcc.gnu.org/viewcvs?rev=225941&root=gcc&view=rev
Log:
Backport from mainline:
2015-07-10  Uros Bizjak  

PR target/66703
* gcc.target/i386/readeflags-1.c (readeflags_test): Declare with
__attribute__((noinline, noclone)).  Change "x" to "volatile char"
type to prevent possible flag-clobbering zero-extensions.
* gcc.target/i386/pr66703.c: New test.


Added:
branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/pr66703.c
Modified:
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/readeflags-1.c


[Bug tree-optimization/61929] [Graphite]: Banerjee and Omega differ on distance vectors (internal compiler error in compute_affine_dependence)

2015-07-17 Thread spop at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929

--- Comment #10 from Sebastian Pop  ---
Author: spop
Date: Fri Jul 17 16:34:21 2015
New Revision: 225942

URL: https://gcc.gnu.org/viewcvs?rev=225942&root=gcc&view=rev
Log:
[graphite] fix pr61929

This fixes bootstrap of GCC with BOOT_CFLAGS="-g -O2 -fgraphite-identity
-floop-nest-optimize -floop-block -floop-interchange -floop-strip-mine".  It
passes regstrap on amd64-linux.  A previous change
(https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=213816), replaced
isl_int with isl_val because isl_int would be deprecated. Since isl_val has
stricter checks, it exposed the bug.  In the test case (isl_set_max_val) would
return infinity which would remain unchecked.  We now check if the value
returned is an integer or not, and bail out if it isn't.  The other problem was
that we were allowing all kinds of data-refs in a scop.  Now we discard a scop
if it has any date-ref other than (ARRAY_REF, MEM_REF, COMPONENT_REF).

PR middle-end/61929
* graphite-dependences.c (add_pdr_constraints): Renamed
pdr->extent to pdr->subscript_sizes.
* graphite-interchange.c (build_linearized_memory_access): Add
back all gcc_assert's that the "isl_int to isl_val conversion"
patch has removed.  Refactored.
(pdr_stride_in_loop): Renamed pdr->extent to pdr->subscript_sizes.
* graphite-poly.c (new_poly_dr): Same.
(free_poly_dr): Same.
* graphite-poly.h (struct poly_dr): Same.
* graphite-scop-detection.c (stmt_has_simple_data_refs_p): Ignore
all data references other than ARRAY_REF, MEM_REF, and COMPONENT_REF.
* graphite-scop-detection.h: Fix space.
* graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Add
back all gcc_assert's removed by a previous patch.
(wrap): Remove the_isl_ctx global variable that the same patch has
added.
(build_loop_iteration_domains): Same.
(add_param_constraints): Same.
(pdr_add_data_dimensions): Same.  Refactored.
(build_poly_dr): Renamed extent to subscript_sizes.

testsuite/
PR middle-end/61929
* gcc.dg/graphite/pr61929.c: New.

Added:
trunk/gcc/testsuite/gcc.dg/graphite/pr61929.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/graphite-dependences.c
trunk/gcc/graphite-interchange.c
trunk/gcc/graphite-poly.c
trunk/gcc/graphite-poly.h
trunk/gcc/graphite-scop-detection.c
trunk/gcc/graphite-scop-detection.h
trunk/gcc/graphite-sese-to-poly.c
trunk/gcc/testsuite/ChangeLog


[Bug middle-end/66915] New: [6 Regression] FAIL: gcc.dg/fixed-point/unary.c execution test on arm

2015-07-17 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66915

Bug ID: 66915
   Summary: [6 Regression] FAIL: gcc.dg/fixed-point/unary.c
execution test on arm
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ktkachov at gcc dot gnu.org
CC: rguenth at gcc dot gnu.org
  Target Milestone: ---
 Build: arm-none-eabi, arm-none-linux-gnueabi,
arm-none-linux-gnueabihf

I see this test fail on arm targets after:

Author: rguenth 
Date:   Wed Jul 15 12:25:57 2015 +

2015-07-15  Richard Biener  

* fold-const.c (fold_binary_loc): Move bool_var != 0 -> bool_var
and bool_var == 1 -> bool_var simplifications ...
* match.pd: ... to patterns here.  Factor out negate_expr_p
cases from the A - B -> A + (-B) patterns as negate_expr_p
predicate and add a -(A + B) -> (-B) - A pattern.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225825
138bc75d-0d04-0410-961f-82ee72b054a4


[Bug tree-optimization/61929] [Graphite]: Banerjee and Omega differ on distance vectors (internal compiler error in compute_affine_dependence)

2015-07-17 Thread spop at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929

Sebastian Pop  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Sebastian Pop  ---
Fixed.


[Bug fortran/66911] ICE on allocate character with source as a derived type component

2015-07-17 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-07-17
 CC||vehre at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed on gcc version 5.1.1 20150612, but this has been fixed on trunk (6.0)
likely at r223445 (pr65548: r222994 gives the ICE).


[Bug middle-end/66915] [6 Regression] FAIL: gcc.dg/fixed-point/unary.c execution test on arm

2015-07-17 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66915

--- Comment #1 from ktkachov at gcc dot gnu.org ---
My cross was configured with:
--with-newlib --without-isl --with-arch=armv7-a --with-float=hard
--with-fpu=neon-vfpv4


[Bug middle-end/66916] New: [6 Regression] FAIL: gcc.target/arm/pr43920-2.c object-size text <= 54

2015-07-17 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66916

Bug ID: 66916
   Summary: [6 Regression] FAIL: gcc.target/arm/pr43920-2.c
object-size text <= 54
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ktkachov at gcc dot gnu.org
CC: rguenth at gcc dot gnu.org
  Target Milestone: ---
 Build: arm*

Created attachment 36006
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36006&action=edit
Failing assembly

After this commit I'm seeing the test fail on arm targets:

Author: rguenth 
Date:   Thu Jul 16 08:28:51 2015 +

2015-07-16  Richard Biener  

* fold-const.c (fold_widened_comparison): Remove.
(fold_sign_changed_comparison): Likewise.
(fold_comparison): Move widened and sign-changed comparison
simplification ...
* match.pd: ... to patterns here.
* generic-match-head.c: Include target.h.
* gimple-match-head.c: Likewise.

* gcc.dg/tree-ssa/pr21031.c: Adjust.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225861
138bc75d-0d04-0410-961f-82ee72b054a4


a sub+cmp sequence is not merged into a subs, causing the code size regression


[Bug middle-end/66916] [6 Regression] FAIL: gcc.target/arm/pr43920-2.c object-size text <= 54

2015-07-17 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66916

--- Comment #1 from ktkachov at gcc dot gnu.org ---
Created attachment 36007
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36007&action=edit
good assembly before the offending commit

Attaching the good assembly before the commit


[Bug fortran/52846] [F2008] Support submodules

2015-07-17 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #15 from Paul Thomas  ---
Author: pault
Date: Fri Jul 17 17:23:45 2015
New Revision: 225945

URL: https://gcc.gnu.org/viewcvs?rev=225945&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  

PR fortran/52846
* decl.c (gfc_match_end): Pick out declared submodule name from
the composite identifier.
* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
* module.c (gfc_match_submodule): Define submodule_name and add
static 'submodule_name'.
(gfc_match_submodule): Build up submodule filenames, using '@'
as a delimiter. Store the output filename in 'submodule_name'.
Similarly, the submodule identifier is built using '.' as an
identifier.
(gfc_dump_module): If current state is COMP_SUBMODULE, write
to file 'submodule_name', using SUBMODULE_EXTENSION.
(gfc_use_module): Similarly, use the 'submodule_name' field in
the gfc_use_list structure and SUBMODULE_EXTENSION to read the
implicitly used submodule files.

2015-07-17  Paul Thomas  

PR fortran/52846
* lib/fortran-modules.exp (proc cleanup-submodules): New
procedure.
* gfortran.dg/submodule_1.f08: Change extension and clean up
the submodule files.
* gfortran.dg/submodule_2.f08: ditto
* gfortran.dg/submodule_6.f08: ditto
* gfortran.dg/submodule_7.f08: ditto
* gfortran.dg/submodule_8.f08: New test
* gfortran.dg/submodule_9.f08: New test

Added:
trunk/gcc/testsuite/gfortran.dg/submodule_1.f08
  - copied, changed from r225943,
trunk/gcc/testsuite/gfortran.dg/submodule_1.f90
Removed:
trunk/gcc/testsuite/gfortran.dg/submodule_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/module.c
trunk/gcc/testsuite/lib/fortran-modules.exp


[Bug fortran/52846] [F2008] Support submodules

2015-07-17 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #18 from Paul Thomas  ---
Author: pault
Date: Fri Jul 17 17:25:04 2015
New Revision: 225948

URL: https://gcc.gnu.org/viewcvs?rev=225948&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  

PR fortran/52846
* decl.c (gfc_match_end): Pick out declared submodule name from
the composite identifier.
* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
* module.c (gfc_match_submodule): Define submodule_name and add
static 'submodule_name'.
(gfc_match_submodule): Build up submodule filenames, using '@'
as a delimiter. Store the output filename in 'submodule_name'.
Similarly, the submodule identifier is built using '.' as an
identifier.
(gfc_dump_module): If current state is COMP_SUBMODULE, write
to file 'submodule_name', using SUBMODULE_EXTENSION.
(gfc_use_module): Similarly, use the 'submodule_name' field in
the gfc_use_list structure and SUBMODULE_EXTENSION to read the
implicitly used submodule files.

2015-07-17  Paul Thomas  

PR fortran/52846
* lib/fortran-modules.exp (proc cleanup-submodules): New
procedure.
* gfortran.dg/submodule_1.f08: Change extension and clean up
the submodule files.
* gfortran.dg/submodule_2.f08: ditto
* gfortran.dg/submodule_6.f08: ditto
* gfortran.dg/submodule_7.f08: ditto
* gfortran.dg/submodule_8.f08: New test
* gfortran.dg/submodule_9.f08: New test

Added:
trunk/gcc/testsuite/gfortran.dg/submodule_4.f08
  - copied unchanged from r225922,
trunk/gcc/testsuite/gfortran.dg/submodule_4.f90
Removed:
trunk/gcc/testsuite/gfortran.dg/submodule_4.f90


[Bug fortran/52846] [F2008] Support submodules

2015-07-17 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #17 from Paul Thomas  ---
Author: pault
Date: Fri Jul 17 17:24:49 2015
New Revision: 225947

URL: https://gcc.gnu.org/viewcvs?rev=225947&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  

PR fortran/52846
* decl.c (gfc_match_end): Pick out declared submodule name from
the composite identifier.
* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
* module.c (gfc_match_submodule): Define submodule_name and add
static 'submodule_name'.
(gfc_match_submodule): Build up submodule filenames, using '@'
as a delimiter. Store the output filename in 'submodule_name'.
Similarly, the submodule identifier is built using '.' as an
identifier.
(gfc_dump_module): If current state is COMP_SUBMODULE, write
to file 'submodule_name', using SUBMODULE_EXTENSION.
(gfc_use_module): Similarly, use the 'submodule_name' field in
the gfc_use_list structure and SUBMODULE_EXTENSION to read the
implicitly used submodule files.

2015-07-17  Paul Thomas  

PR fortran/52846
* lib/fortran-modules.exp (proc cleanup-submodules): New
procedure.
* gfortran.dg/submodule_1.f08: Change extension and clean up
the submodule files.
* gfortran.dg/submodule_2.f08: ditto
* gfortran.dg/submodule_6.f08: ditto
* gfortran.dg/submodule_7.f08: ditto
* gfortran.dg/submodule_8.f08: New test
* gfortran.dg/submodule_9.f08: New test

Added:
trunk/gcc/testsuite/gfortran.dg/submodule_3.f08
  - copied unchanged from r225922,
trunk/gcc/testsuite/gfortran.dg/submodule_3.f90
Removed:
trunk/gcc/testsuite/gfortran.dg/submodule_3.f90


[Bug fortran/52846] [F2008] Support submodules

2015-07-17 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #16 from Paul Thomas  ---
Author: pault
Date: Fri Jul 17 17:24:32 2015
New Revision: 225946

URL: https://gcc.gnu.org/viewcvs?rev=225946&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  

PR fortran/52846
* decl.c (gfc_match_end): Pick out declared submodule name from
the composite identifier.
* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
* module.c (gfc_match_submodule): Define submodule_name and add
static 'submodule_name'.
(gfc_match_submodule): Build up submodule filenames, using '@'
as a delimiter. Store the output filename in 'submodule_name'.
Similarly, the submodule identifier is built using '.' as an
identifier.
(gfc_dump_module): If current state is COMP_SUBMODULE, write
to file 'submodule_name', using SUBMODULE_EXTENSION.
(gfc_use_module): Similarly, use the 'submodule_name' field in
the gfc_use_list structure and SUBMODULE_EXTENSION to read the
implicitly used submodule files.

2015-07-17  Paul Thomas  

PR fortran/52846
* lib/fortran-modules.exp (proc cleanup-submodules): New
procedure.
* gfortran.dg/submodule_1.f08: Change extension and clean up
the submodule files.
* gfortran.dg/submodule_2.f08: ditto
* gfortran.dg/submodule_6.f08: ditto
* gfortran.dg/submodule_7.f08: ditto
* gfortran.dg/submodule_8.f08: New test
* gfortran.dg/submodule_9.f08: New test

Added:
trunk/gcc/testsuite/gfortran.dg/submodule_2.f08
  - copied, changed from r225922,
trunk/gcc/testsuite/gfortran.dg/submodule_2.f90
Removed:
trunk/gcc/testsuite/gfortran.dg/submodule_2.f90


[Bug fortran/52846] [F2008] Support submodules

2015-07-17 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #19 from Paul Thomas  ---
Author: pault
Date: Fri Jul 17 17:25:55 2015
New Revision: 225953

URL: https://gcc.gnu.org/viewcvs?rev=225953&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  

PR fortran/52846
* decl.c (gfc_match_end): Pick out declared submodule name from
the composite identifier.
* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
* module.c (gfc_match_submodule): Define submodule_name and add
static 'submodule_name'.
(gfc_match_submodule): Build up submodule filenames, using '@'
as a delimiter. Store the output filename in 'submodule_name'.
Similarly, the submodule identifier is built using '.' as an
identifier.
(gfc_dump_module): If current state is COMP_SUBMODULE, write
to file 'submodule_name', using SUBMODULE_EXTENSION.
(gfc_use_module): Similarly, use the 'submodule_name' field in
the gfc_use_list structure and SUBMODULE_EXTENSION to read the
implicitly used submodule files.

2015-07-17  Paul Thomas  

PR fortran/52846
* lib/fortran-modules.exp (proc cleanup-submodules): New
procedure.
* gfortran.dg/submodule_1.f08: Change extension and clean up
the submodule files.
* gfortran.dg/submodule_2.f08: ditto
* gfortran.dg/submodule_6.f08: ditto
* gfortran.dg/submodule_7.f08: ditto
* gfortran.dg/submodule_8.f08: New test
* gfortran.dg/submodule_9.f08: New test

Added:
trunk/gcc/testsuite/gfortran.dg/submodule_5.f08
  - copied unchanged from r225922,
trunk/gcc/testsuite/gfortran.dg/submodule_5.f90
Removed:
trunk/gcc/testsuite/gfortran.dg/submodule_5.f90


[Bug fortran/52846] [F2008] Support submodules

2015-07-17 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #20 from Paul Thomas  ---
Author: pault
Date: Fri Jul 17 17:26:12 2015
New Revision: 225955

URL: https://gcc.gnu.org/viewcvs?rev=225955&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  

PR fortran/52846
* decl.c (gfc_match_end): Pick out declared submodule name from
the composite identifier.
* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
* module.c (gfc_match_submodule): Define submodule_name and add
static 'submodule_name'.
(gfc_match_submodule): Build up submodule filenames, using '@'
as a delimiter. Store the output filename in 'submodule_name'.
Similarly, the submodule identifier is built using '.' as an
identifier.
(gfc_dump_module): If current state is COMP_SUBMODULE, write
to file 'submodule_name', using SUBMODULE_EXTENSION.
(gfc_use_module): Similarly, use the 'submodule_name' field in
the gfc_use_list structure and SUBMODULE_EXTENSION to read the
implicitly used submodule files.

2015-07-17  Paul Thomas  

PR fortran/52846
* lib/fortran-modules.exp (proc cleanup-submodules): New
procedure.
* gfortran.dg/submodule_1.f08: Change extension and clean up
the submodule files.
* gfortran.dg/submodule_2.f08: ditto
* gfortran.dg/submodule_6.f08: ditto
* gfortran.dg/submodule_7.f08: ditto
* gfortran.dg/submodule_8.f08: New test
* gfortran.dg/submodule_9.f08: New test

Added:
trunk/gcc/testsuite/gfortran.dg/submodule_6.f08
  - copied, changed from r225922,
trunk/gcc/testsuite/gfortran.dg/submodule_6.f90
Removed:
trunk/gcc/testsuite/gfortran.dg/submodule_6.f90


[Bug fortran/52846] [F2008] Support submodules

2015-07-17 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #21 from Paul Thomas  ---
Author: pault
Date: Fri Jul 17 17:26:42 2015
New Revision: 225956

URL: https://gcc.gnu.org/viewcvs?rev=225956&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  

PR fortran/52846
* decl.c (gfc_match_end): Pick out declared submodule name from
the composite identifier.
* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
* module.c (gfc_match_submodule): Define submodule_name and add
static 'submodule_name'.
(gfc_match_submodule): Build up submodule filenames, using '@'
as a delimiter. Store the output filename in 'submodule_name'.
Similarly, the submodule identifier is built using '.' as an
identifier.
(gfc_dump_module): If current state is COMP_SUBMODULE, write
to file 'submodule_name', using SUBMODULE_EXTENSION.
(gfc_use_module): Similarly, use the 'submodule_name' field in
the gfc_use_list structure and SUBMODULE_EXTENSION to read the
implicitly used submodule files.

2015-07-17  Paul Thomas  

PR fortran/52846
* lib/fortran-modules.exp (proc cleanup-submodules): New
procedure.
* gfortran.dg/submodule_1.f08: Change extension and clean up
the submodule files.
* gfortran.dg/submodule_2.f08: ditto
* gfortran.dg/submodule_6.f08: ditto
* gfortran.dg/submodule_7.f08: ditto
* gfortran.dg/submodule_8.f08: New test
* gfortran.dg/submodule_9.f08: New test

Added:
trunk/gcc/testsuite/gfortran.dg/submodule_7.f08
  - copied, changed from r225922,
trunk/gcc/testsuite/gfortran.dg/submodule_7.f90
Removed:
trunk/gcc/testsuite/gfortran.dg/submodule_7.f90


[Bug fortran/52846] [F2008] Support submodules

2015-07-17 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #22 from Paul Thomas  ---
Author: pault
Date: Fri Jul 17 17:27:42 2015
New Revision: 225957

URL: https://gcc.gnu.org/viewcvs?rev=225957&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  

PR fortran/52846
* decl.c (gfc_match_end): Pick out declared submodule name from
the composite identifier.
* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
* module.c (gfc_match_submodule): Define submodule_name and add
static 'submodule_name'.
(gfc_match_submodule): Build up submodule filenames, using '@'
as a delimiter. Store the output filename in 'submodule_name'.
Similarly, the submodule identifier is built using '.' as an
identifier.
(gfc_dump_module): If current state is COMP_SUBMODULE, write
to file 'submodule_name', using SUBMODULE_EXTENSION.
(gfc_use_module): Similarly, use the 'submodule_name' field in
the gfc_use_list structure and SUBMODULE_EXTENSION to read the
implicitly used submodule files.

2015-07-17  Paul Thomas  

PR fortran/52846
* lib/fortran-modules.exp (proc cleanup-submodules): New
procedure.
* gfortran.dg/submodule_1.f08: Change extension and clean up
the submodule files.
* gfortran.dg/submodule_2.f08: ditto
* gfortran.dg/submodule_6.f08: ditto
* gfortran.dg/submodule_7.f08: ditto
* gfortran.dg/submodule_8.f08: New test
* gfortran.dg/submodule_9.f08: New test

Added:
trunk/gcc/testsuite/gfortran.dg/submodule_8.f08
trunk/gcc/testsuite/gfortran.dg/submodule_9.f08


[Bug fortran/52846] [F2008] Support submodules

2015-07-17 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #23 from Paul Thomas  ---
Author: pault
Date: Fri Jul 17 17:32:09 2015
New Revision: 225958

URL: https://gcc.gnu.org/viewcvs?rev=225958&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  

PR fortran/52846
* decl.c (gfc_match_end): Pick out declared submodule name from
the composite identifier.
* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
* module.c (gfc_match_submodule): Define submodule_name and add
static 'submodule_name'.
(gfc_match_submodule): Build up submodule filenames, using '@'
as a delimiter. Store the output filename in 'submodule_name'.
Similarly, the submodule identifier is built using '.' as an
identifier.
(gfc_dump_module): If current state is COMP_SUBMODULE, write
to file 'submodule_name', using SUBMODULE_EXTENSION.
(gfc_use_module): Similarly, use the 'submodule_name' field in
the gfc_use_list structure and SUBMODULE_EXTENSION to read the
implicitly used submodule files.

2015-07-17  Paul Thomas  

PR fortran/52846
* lib/fortran-modules.exp (proc cleanup-submodules): New
procedure.
* gfortran.dg/submodule_1.f08: Change extension and clean up
the submodule files.
* gfortran.dg/submodule_2.f08: ditto
* gfortran.dg/submodule_6.f08: ditto
* gfortran.dg/submodule_7.f08: ditto
* gfortran.dg/submodule_8.f08: New test
* gfortran.dg/submodule_9.f08: New test

Modified:
trunk/gcc/testsuite/ChangeLog


[Bug rtl-optimization/66890] function splitting only works with profile feedback

2015-07-17 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66890

--- Comment #4 from Andi Kleen  ---
Created attachment 36008
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36008&action=edit
Updated patch with documentation and param

I updated the patch with proper documentation and a param for the cut off.
In some tests it appears to do the right thing when building a Linux kernel.


[Bug c++/66834] [concepts] concept parameter kind mismatch causes hard error

2015-07-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66834

--- Comment #14 from Jason Merrill  ---
Author: jason
Date: Fri Jul 17 17:43:09 2015
New Revision: 225959

URL: https://gcc.gnu.org/viewcvs?rev=225959&root=gcc&view=rev
Log:
PR c++/66092
PR c++/66834
* gcc/cp/pt.c (coerce_template_parms): Re-apply earlier change.

Added:
branches/c++-concepts/gcc/testsuite/g++.dg/concepts/dr1430.C
Modified:
branches/c++-concepts/ChangeLog.concepts
branches/c++-concepts/gcc/cp/pt.c


[Bug c++/66092] [c++-concepts] Concept can't check variadic template arguments

2015-07-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66092

--- Comment #6 from Jason Merrill  ---
Author: jason
Date: Fri Jul 17 17:43:09 2015
New Revision: 225959

URL: https://gcc.gnu.org/viewcvs?rev=225959&root=gcc&view=rev
Log:
PR c++/66092
PR c++/66834
* gcc/cp/pt.c (coerce_template_parms): Re-apply earlier change.

Added:
branches/c++-concepts/gcc/testsuite/g++.dg/concepts/dr1430.C
Modified:
branches/c++-concepts/ChangeLog.concepts
branches/c++-concepts/gcc/cp/pt.c


[Bug target/66906] [4.9/5/6] gcc.dg/torture/stackalign/nested-1.c fails on ICE with -O0 -m32 -mregparm=3 or -miamcu

2015-07-17 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66906

H.J. Lu  changed:

   What|Removed |Added

   Target Milestone|--- |6.0

--- Comment #4 from H.J. Lu  ---
A patch is posted at

https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01558.html


[Bug fortran/66911] ICE on allocate character with source as a derived type component

2015-07-17 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #1)
> Confirmed on gcc version 5.1.1 20150612, but this has been fixed on trunk
> (6.0) likely at r223445 (pr65548: r222994 gives the ICE).

troutmask:sgk[211] gfc6 -o z rt.f90
troutmask:sgk[212] ./z
   1
   2
Segmentation fault (core dumped)

Are you sure it's fixed on trunk?

(gdb) run ./z
Starting program: /mnt/sgk/tmp/z ./z
   1
   2

Program received signal SIGSEGV, Segmentation fault.
0x004022c2 in g_mod::env_table_add (key=..., valeur=..., _key=3, 
_valeur=2) at rt.f90:30
30   environment_table(size(temp)+1)%key=key

gfc6 is gcc version 6.0.0 20150716


[Bug fortran/66907] Correct code produces "Segmentation fault - invalid memory reference"

2015-07-17 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66907

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org ---
(In reply to mrestelli from comment #0)
> The attached code compiles with gfortran and produces an error at
> runtime. As far as I can see, the code is correct. Unfortunately, I
> have been unable to reduce the test further; if I try, the problem
> disappears.
> 
> 
> $ gfortran gft.f90 -g -O0 -o gft
> $ ./gft 
> 
> Program received signal SIGSEGV: Segmentation fault - invalid memory
> reference.
> 
> Backtrace for this error:
> #0  0x7F281A1F6757
> #1  0x7F281A1F6D5E
> #2  0x7F281972EE8F
> #3  0x400A15 in __mod_a_MOD_mult at gft.f90:67
> #4  0x400F44 in __mod_a_MOD_check_t_b at gft.f90:38 (discriminator 2)
> #5  0x401160 in test at gft.f90:84 (discriminator 2)
> Speicherzugriffsfehler
> 
> $ gfortran --version
> GNU Fortran (GCC) 6.0.0 20150715 (experimental)
> Copyright (C) 2015 Free Software Foundation, Inc.
> 
> 
> The correct behaviour should be
> 
> $ ./gft 
>  p(1):1
>  p(2):1
> 

Program appears to function correctly if one uses -O or -O2.
% gfc6 -o z -O er.f90
% ./z
 p(1):1
 p(2):1


without optimization one gets
(gdb) run
Starting program: /mnt/sgk/tmp/z 

Program received signal SIGSEGV, Segmentation fault.
0x00400cb5 in mod_a::mult (p1=..., p2=...) at er.f90:57
57p1_dat = p1%dat(1)

It also works without optimization if one uses a temp variable
in check_t_b().
 pure recursive function check_t_b(d) result(b)
  integer, intent(in) :: d
  type(t_b) :: b(2)

  type(t_b) :: xd, tmp

   xd = 1.0

   if(d.eq.1) then
 b = 1.0
   else
 tmp = xd**0
 b = tmp*check_t_b(1)
   endif


[Bug fortran/66911] ICE on allocate character with source as a derived type component

2015-07-17 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911

--- Comment #3 from Dominique d'Humieres  ---
[Book15] f90/bug% gfc pr66911.f90 -fsanitize=address
[Book15] f90/bug% a.out
 s:"" derived:"tt"
[Book15] f90/bug% gfc -v
Using built-in specs.
COLLECT_GCC=gfc
COLLECT_LTO_WRAPPER=/opt/gcc/gcc6w/libexec/gcc/x86_64-apple-darwin14.4.0/6.0.0/lto-wrapper
Target: x86_64-apple-darwin14.4.0
Configured with: ../work/configure --prefix=/opt/gcc/gcc6w
--enable-languages=c,c++,fortran,objc,obj-c++,ada,java,lto
--with-gmp=/opt/mp-new --with-system-zlib --with-isl=/opt/mp-new --enable-lto
--enable-plugin --with-arch=corei7 --with-cpu=corei7
Thread model: posix
gcc version 6.0.0 20150717 (experimental) [trunk revision 225931] (GCC)


[Bug fortran/61831] [4.9/ 5 Regression] runtime error: pointer being freed was not allocated

2015-07-17 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61831

--- Comment #50 from Dominique d'Humieres  ---
Compiling the original test of pr40440 after revision r225926 gives an ICE:

[Book15] f90/bug% gfcp pr40440.f90 iso_varying_string.o
pr40440.f90:69:0:

 call ifile_append_from_string (ifile, var_str (trim (char)))
1
internal compiler error: Segmentation fault: 11

A variant that does not require iso_varying_string ICE with

pr40440_2.f90:2456:0:

   rep_string = substring//extract(work_string,
start=i_target+length_target)//rep_string
1
internal compiler error: Segmentation fault: 11

Should I file a new PR?


[Bug target/66814] ICE: gcc.target/i386/avx512f-klogic-2.c

2015-07-17 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66814

--- Comment #6 from uros at gcc dot gnu.org ---
Author: uros
Date: Fri Jul 17 18:44:33 2015
New Revision: 225961

URL: https://gcc.gnu.org/viewcvs?rev=225961&root=gcc&view=rev
Log:
Backport from mainline:
2015-07-10  Uros Bizjak  

* config/i386/sse.md (movdi_to_sse): Use gen_lowpart
and gen_higpart instead of gen_rtx_SUBREG.
* config/i386/i386.md
(floatdi2_i387_with_xmm splitter): Ditto.
(read-modify peephole2): Use gen_lowpart instead of
gen_rtx_SUBREG for operand 5.

2015-06-17  Uros Bizjak  

Backport from mainline:
2015-07-08  Uros Bizjak  

PR target/66814
* config/i386/predicates.md (nonimmediate_gr_operand): New predicate.
* config/i386/i386.md (not peephole2): Use nonimmediate_gr_operand.
(varous peephole2s): Use {GENERAL,SSE,MMX}_REGNO_P instead of
{GENERAL,SSE,MMX}_REG_P where appropriate.

testsuite/ChangeLog:

Backport from mainline:
2015-07-09  Uros Bizjak  

PR target/66814
* gcc.target/i386/pr66814.c: New test.


Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/pr66814.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/config/i386/i386.md
branches/gcc-4_9-branch/gcc/config/i386/predicates.md
branches/gcc-4_9-branch/gcc/config/i386/sse.md
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


[Bug target/66703] [4.9/5/6] gcc.target/i386/readeflags-1.c aborts on -march=i586 or on -miamcu

2015-07-17 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66703

--- Comment #8 from uros at gcc dot gnu.org ---
Author: uros
Date: Fri Jul 17 18:45:50 2015
New Revision: 225962

URL: https://gcc.gnu.org/viewcvs?rev=225962&root=gcc&view=rev
Log:
Backport from mainline:
2015-07-10  Uros Bizjak  

PR target/66703
* gcc.target/i386/readeflags-1.c (readeflags_test): Declare with
__attribute__((noinline, noclone)).  Change "x" to "volatile char"
type to prevent possible flag-clobbering zero-extensions.
* gcc.target/i386/pr66703.c: New test.


Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/pr66703.c
Modified:
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/readeflags-1.c


[Bug target/66814] ICE: gcc.target/i386/avx512f-klogic-2.c

2015-07-17 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66814

Uroš Bizjak  changed:

   What|Removed |Added

 Target||x86
 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|5.3 |4.9.4

--- Comment #7 from Uroš Bizjak  ---
Fixed everywhere.

[Bug fortran/66911] ICE on allocate character with source as a derived type component

2015-07-17 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911

--- Comment #4 from Steve Kargl  ---
On Fri, Jul 17, 2015 at 06:21:38PM +, dominiq at lps dot ens.fr wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911
> 
> --- Comment #3 from Dominique d'Humieres  ---
> [Book15] f90/bug% gfc pr66911.f90 -fsanitize=address
> [Book15] f90/bug% a.out
>  s:"" derived:"tt"
> [Book15] f90/bug% gfc -v

Ah, yes, it seems either Andre's or Mikael's latest commit
fixed the problem on 6.0.


[Bug target/66703] [4.9/5/6] gcc.target/i386/readeflags-1.c aborts on -march=i586 or on -miamcu

2015-07-17 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66703

Uroš Bizjak  changed:

   What|Removed |Added

 Target||x86
 Resolution|WONTFIX |FIXED
   Assignee|unassigned at gcc dot gnu.org  |ubizjak at gmail dot com
   Target Milestone|--- |4.9.4

--- Comment #9 from Uroš Bizjak  ---
Testcase was fixed everywhere.

[Bug tree-optimization/65850] [5/6 Regression] [graphite]: isl_constraint.c:625: expecting integer value

2015-07-17 Thread hiraditya at msn dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65850

AK  changed:

   What|Removed |Added

 CC||hiraditya at msn dot com

--- Comment #4 from AK  ---
This bug appears to be a duplicate of #61929. The fix (r225942) has been pushed
today. Please verify if this fixes your problem.


[Bug fortran/61831] [4.9/ 5 Regression] runtime error: pointer being freed was not allocated

2015-07-17 Thread mikael at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61831

--- Comment #51 from Mikael Morin  ---
(In reply to Dominique d'Humieres from comment #50)
> Should I file a new PR?

Yes, please.
Two commits today, two regressions.


[Bug jit/66783] No error-checking for creating structs containing opaque structs

2015-07-17 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66783

David Malcolm  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2015-07-17
 Ever confirmed|0   |1

--- Comment #5 from David Malcolm  ---
Keeping this open until it's committed to the gcc-5-branch


[Bug fortran/61831] [4.9/ 5 Regression] runtime error: pointer being freed was not allocated

2015-07-17 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61831

--- Comment #52 from Uroš Bizjak  ---
(In reply to Mikael Morin from comment #51)
> (In reply to Dominique d'Humieres from comment #50)
> > Should I file a new PR?
> 
> Yes, please.
> Two commits today, two regressions.

There is another PR that seems related, PR 64986.

[Bug target/66917] New: ARM: NEON: memcpy compiles to vld1 and vst1 with incorrect alignment

2015-07-17 Thread mhw at netris dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66917

Bug ID: 66917
   Summary: ARM: NEON: memcpy compiles to vld1 and vst1 with
incorrect alignment
   Product: gcc
   Version: 4.9.3
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mhw at netris dot org
  Target Milestone: ---

Created attachment 36009
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36009&action=edit
Minimal example code that is miscompiled

The attached C source code is mis-compiled by GCC 4.9.3 with -O3 and
-mfpu=neon.  Calls to memcpy between a uint8_t* parameter and a local variable
are compiled into vld1.64 and vst1.64 instructions with an alignment field that
specifies that the memory address (the uint8_t* parameter) is aligned on a
64-bit boundary, although there is no basis for assuming such an alignment.

Here's the C code:

  #include 
  #include 

  void
  test_neon_load_store_alignment (const uint8_t *ap,
  const uint8_t *bp,
  uint8_t *outp)
  {
union {
  uint64_t u[2];
  uint8_t c[16];
} a, b;

memcpy (a.c, ap, 16);
memcpy (b.c, bp, 16);
a.u[0] ^= b.u[0];
a.u[1] ^= b.u[1];
memcpy (outp, a.c, 16);
  }

When natively compiled with -S -O3 using GCC 4.9.3 configured with
"--build=arm-unknown-linux-gnueabihf --with-arch=armv7-a --with-float=hard
--with-mode=thumb --with-fpu=neon", here's the output:

.syntax unified
.arch armv7-a
.eabi_attribute 27, 3
.eabi_attribute 28, 1
.fpu neon
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 2
.eabi_attribute 34, 1
.eabi_attribute 18, 4
.thumb
.file   "foo.c"
.text
.align  2
.global test_neon_load_store_alignment
.thumb
.thumb_func
.type   test_neon_load_store_alignment, %function
test_neon_load_store_alignment:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
vld1.64 {d16-d17}, [r0:64]
vld1.64 {d18-d19}, [r1:64]
veorq8, q8, q9
vst1.64 {d16-d17}, [r2:64]
bx  lr
.size   test_neon_load_store_alignment,
.-test_neon_load_store_alignment
.ident  "GCC: (GNU) 4.9.3"
.section.note.GNU-stack,"",%progbits

Here, r0 contains ap, r1 contains bp, and r2 contains outp.  The associated
operands of the vld1.64 and vst1.64 instructions are [r:64], which specify
that the memory address is known to be aligned on a 64-bit boundary, although
that is not necessarily the case.

See section A8.6.307 (page A8-602) of the ARM v7 Architecture Reference Manual,
which spells out quite clearly that for this instruction:

  if (address MOD alignment) != 0 then GenerateAlignmentException();

and that in this case, alignment == 8.

This may be related to bug #57271.

If needed, I can provide instructions for how to reproduce the exact same GCC
binary I'm using, and all other software that it depends on, using GNU Guix
.

FYI, the attached minimal test case was distilled from code in OpenSSL 1.0.2d
that is miscompiled by GCC 4.9.3 in our armhf port targetting NEON, and leads
to a Bus Error on the Novena laptop.


[Bug debug/66468] [6 Regression] ICE in in check_die, at dwarf2out.c:5719

2015-07-17 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66468

--- Comment #6 from H.J. Lu  ---
Any progress on this?  FDO+LTO bootstrap has been broken for weeks now.


[Bug c/66918] New: Disable "inline function declared but never defined" warning

2015-07-17 Thread eugene.zelenko at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66918

Bug ID: 66918
   Summary: Disable "inline function declared but never defined"
warning
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: eugene.zelenko at gmail dot com
  Target Milestone: ---

It looks like there is no way to disable this warning (at least in 5.2.0).

Part of my code base is built with -Werror, so I usually treat warnings
introduced in new versions of GCC as no errors (-Wno-error). "inline function
declared but never defined" point to -Werror as way to disable it, but I think
will be better to have individual switch.


[Bug preprocessor/66909] Internal Compiler Error when #including files from /sys on Linux

2015-07-17 Thread nate at natecraun dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66909

--- Comment #2 from Nate Craun  ---
It seems that clang has a similar issue. I added an entry on their bug tracker
here: https://llvm.org/bugs/show_bug.cgi?id=24168

As mentioned in clang's bug tracker:

I think the problem is related to the use of stat. For example, the manpage for
stat() mentions:

"For  most files under the /proc directory, stat() does not return the file
size in the st_size field; instead the field is returned with the value 0."

To test this out I wrote another test that tries to #include a file from /proc.

#include "/proc/meminfo"

However this did not #include the text from the /proc/meminfo at all. Running
the preprocessor on this produced an empty file. This is presumably because
stat() is saying /proc/meminfo has zero bytes.

I don't know if this #including files from proc bug should have its own issue
or not, as it seems to be related to the same underlying issue of stat()
behaving differently on procfs, sysfs, and maybe others.

Like I said before though, I don't have any practical use for #including files
from /proc or /sys. But the preprocessor should still be able to do this
textual inclusion correctly.

I haven't tried this out yet, but now I'm wondering if #include will have
issues on other special files on Linux: pipes, sockets, dev files, etc.


[Bug target/66866] [4.9/5 Regression] incorrect load address on manual vector shuffle

2015-07-17 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66866

--- Comment #10 from uros at gcc dot gnu.org ---
Author: uros
Date: Fri Jul 17 20:25:09 2015
New Revision: 225968

URL: https://gcc.gnu.org/viewcvs?rev=225968&root=gcc&view=rev
Log:
PR target/66866
* config/i386/i386.c (ix86_expand_pinsr): Reject non-lowpart
source subregs.

testsuite/ChangeLog:

PR target/66866
* g++.dg/pr66866.C: New test.


Added:
branches/gcc-5-branch/gcc/testsuite/g++.dg/pr66866.C
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/config/i386/i386.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog


[Bug c++/66919] New: [5 Regression] C++14 ICE during error reporting

2015-07-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66919

Bug ID: 66919
   Summary: [5 Regression] C++14 ICE during error reporting
   Product: gcc
   Version: 5.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jakub at gcc dot gnu.org
CC: jason at gcc dot gnu.org, paolo at gcc dot gnu.org
  Target Milestone: ---

template 
struct A {
  template 
static auto run (F fn, R, T) { auto r =  fn (); }
};
template 
auto foo (F fn, T)
{
  A <0>::run (fn, 0, 0);
}
struct B;
struct C {
  typedef B D;
};
struct E {
  virtual void bar (const int &);
};
template 
struct F : E {
  typedef typename C::D::G G;
  void bar (const G &);
  typename C::D::H I;
};
struct J { struct K {}; };
template 
void
F::bar (const G &)
{
  auto s = I;
  typedef decltype (s) L;
  auto u =[&](L) { auto t = foo (J::K (), 0); };
}
struct B {
  typedef int G;
  typedef int H;
};
struct M : F  {
  M () {}
};

ICEs with -std=c++1y starting with r211188 and it got fixed (or went latent) on
the trunk with r222150.


[Bug c++/66919] [5 Regression] C++14 ICE during error reporting

2015-07-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66919

Jakub Jelinek  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-07-17
   Target Milestone|--- |5.3
 Ever confirmed|0   |1


[Bug target/66867] Suboptimal code generation for C11 atomic_compare_exchange_strong_explicit()

2015-07-17 Thread sebastian.hu...@embedded-brains.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66867

--- Comment #1 from Sebastian Huber  ---
This problem is also present on x86.  The depreated
__sync_bool_compare_and_swap() produces better code.

#include 

void f(atomic_uint *a)
{
  unsigned int e = 0;
  atomic_compare_exchange_strong_explicit(a, &e, 1, memory_order_relaxed,
memory_order_relaxed);
}

void g(unsigned int *a)
{
  __sync_bool_compare_and_swap(a, 0, 1);
}

.file   "cas.c"
.section.text.unlikely,"ax",@progbits
.LCOLDB0:
.text
.LHOTB0:
.p2align 4,,15
.globl  f
.type   f, @function
f:
.LFB0:
.cfi_startproc
movl$1, %edx
xorl%eax, %eax
movl$0, -4(%rsp) <- Superfluous
lock cmpxchgl   %edx, (%rdi)
ret
.cfi_endproc
.LFE0:
.size   f, .-f
.section.text.unlikely
.LCOLDE0:
.text
.LHOTE0:
.section.text.unlikely
.LCOLDB1:
.text
.LHOTB1:
.p2align 4,,15
.globl  g
.type   g, @function
g:
.LFB1:
.cfi_startproc
movl$1, %edx
xorl%eax, %eax
lock cmpxchgl   %edx, (%rdi)
ret
.cfi_endproc
.LFE1:
.size   g, .-g
.section.text.unlikely
.LCOLDE1:
.text
.LHOTE1:
    .ident  "GCC: (GNU) 6.0.0 20150717 (experimental)"
.section.note.GNU-stack,"",@progbits


[Bug middle-end/64394] ICE: in build_linearized_memory_access, at graphite-interchange.c:121 (isl_constraint.c:558: expecting integer value) with -floop-interchange

2015-07-17 Thread hiraditya at msn dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64394

AK  changed:

   What|Removed |Added

 CC||hiraditya at msn dot com

--- Comment #3 from AK  ---
This bug appears to be a duplicate of bug61929. The fix (r225942) has been
pushed today. Please verify if this fixes your problem.


[Bug objc/53905] -Wformat-nonliteral gives false positives with __attribute__((format(NSString,...)))

2015-07-17 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53905

Eric Gallager  changed:

   What|Removed |Added

 CC||egall at gwmail dot gwu.edu

--- Comment #1 from Eric Gallager  ---
Huh, that's strange... I could have sworn in some other project, I managed to
silence these types of warnings by rewriting the call to NSLog as something
like:

NSLog(@"%@", @"Hi!");

...but that still seems to fail with your example here.


[Bug inline-asm/49611] Inline asm should support input/output of flags

2015-07-17 Thread gccbugzilla at limegreensocks dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49611

--- Comment #14 from David  ---
(In reply to Jeremy from comment #12)

> It probably does a setcc on x86 which doesn't really gain much

I don't have a 6.0 build to test with yet, but I don't believe that's quite
correct.  Looking at the testsuite that got checked in with it, we see both:

asm-flag-2.c:
/* { dg-final { scan-assembler "seta" } } */

asm-flag-3.c:
/* { dg-final { scan-assembler "ja" } } */


[Bug target/66866] [4.9/5 Regression] incorrect load address on manual vector shuffle

2015-07-17 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66866

--- Comment #11 from uros at gcc dot gnu.org ---
Author: uros
Date: Fri Jul 17 21:39:27 2015
New Revision: 225970

URL: https://gcc.gnu.org/viewcvs?rev=225970&root=gcc&view=rev
Log:
PR target/66866
* config/i386/i386.c (ix86_expand_pinsr): Reject non-lowpart
source subregs.

testsuite/ChangeLog:

PR target/66866
* g++.dg/pr66866.C: New test.


Added:
branches/gcc-4_9-branch/gcc/testsuite/g++.dg/pr66866.C
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/config/i386/i386.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


[Bug target/66866] [4.9/5 Regression] incorrect load address on manual vector shuffle

2015-07-17 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66866

Uroš Bizjak  changed:

   What|Removed |Added

 Target|x86_64-*-*  |x86
 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #12 from Uroš Bizjak  ---
Fixed everywhere.

[Bug middle-end/66920] New: ICE in expand_debug_locations, at cfgexpand.c:3826

2015-07-17 Thread jan.sm...@alcatel-lucent.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66920

Bug ID: 66920
   Summary: ICE in expand_debug_locations, at cfgexpand.c:3826
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jan.sm...@alcatel-lucent.com
  Target Milestone: ---

Compile with  -xc++ -w   -m32 -gdwarf-4  -mno-sse -O1  test.cpp



test.cpp: In function 'bool test_sp(Desc*, data*)':
test.cpp:29:1: internal compiler error: in expand_debug_locations, at
cfgexpand.c:3826
 test_sp(Desc *pDesc, data *info) {


typedef long int64_t;
typedef int UINT32;
typedef short len;
struct header;
typedef UINT32 number;
struct Desc {
  short length;
};
typedef int64_t v2di __attribute__((vector_size(16)));
int table;
struct data;


void __attribute__((__always_inline__))
counter_inc(struct counter *, long, long) {
  v2di v2di{};
}

bool ing_build_qhdr_and_output(Desc *pDesc,
   data *, header *,
   number, number, bool,
   len, len,
   len) {
  counter_inc((counter *)table, 1,
  pDesc->length);
}

bool __attribute__((target("sse4.2")))
test_sp(Desc *pDesc, data *info) {
  number dest, queue_stat_addr, plen_length;
  UINT32 offset;
  UINT32 extra_header_size;
  header *sw_hdr;
  return ing_build_qhdr_and_output(pDesc, info, sw_hdr, dest,
   queue_stat_addr, 2, offset,
   extra_header_size, plen_length);
}


[Bug c++/66921] New: failure to determine size of static constexpr array that is nested within a templated class

2015-07-17 Thread vlad at petric dot cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66921

Bug ID: 66921
   Summary: failure to determine size of static constexpr array
that is nested within a templated class
   Product: gcc
   Version: 4.9.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vlad at petric dot cc
  Target Milestone: ---

Created attachment 36010
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36010&action=edit
straightforward file (include-less) that fails to compile

template
struct Holder {
  constexpr static const int array[] = { 1, 2, 3 };
  enum {F = array[0]};
};

class HI: public Holder {};

gcc 4.9.3/Centos linux.

$ g++ -std=c++11 ./x.cc -o x.o -c
./x.cc: In instantiation of ‘constexpr const int Holder::array []’:
./x.cc:4:18:   required from ‘struct Holder’
./x.cc:7:18:   required from here
./x.cc:3:30: error: initializer fails to determine size of ‘Holder::array’
   constexpr static const int array[] = { 1, 2, 3 };
  ^
./x.cc:3:30: error: array must be initialized with a brace-enclosed initializer
./x.cc: In instantiation of ‘struct Holder’:
./x.cc:7:18:   required from here
./x.cc:4:8: error: enumerator value for ‘F’ is not an integer constant
   enum {F = array[0]};



* with gcc 4.8.3, it compiles just fine.

* if I remove the template, it also compiles just fine:

struct Holder {
  constexpr static const int array[] = { 1, 2, 3 };
  enum {F = array[0]};
};

class HI: public Holder {};

[Bug c/28492] -Wmissing-format-attribute causes warning for vsnprintf()

2015-07-17 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28492

Eric Gallager  changed:

   What|Removed |Added

 CC||egall at gwmail dot gwu.edu

--- Comment #4 from Eric Gallager  ---
(In reply to Manuel López-Ibáñez from comment #3)
> OK, I see that the warning is misleading, because it points to the call of
> vsnprintf instead of pointing to vsnprintf_one.
> 
> ttest.c: In function ‘vsnprintf_one’:
> ttest.c:826:5: warning: function might be possible candidate for
> ‘gnu_printf’ format attribute [-Wmissing-format-attribute]
>  vsnprintf(self, 2, "%c", arglist);
>  ^

Same thing with the other members of the vprintf family of functions, such as
vfprintf... I remember getting particularly confused by this one in the past
and hacking together some really ugly workarounds to deal with it, when all I
really needed to do was to put the format attribute on the calling function,
instead of trying to re-declare vfprintf...

[Bug target/57271] ARM: gcc generates insufficient alignment for memory passed as extra argument for function return large composite type

2015-07-17 Thread mhw at netris dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57271

Mark H Weaver  changed:

   What|Removed |Added

 CC||mhw at netris dot org

--- Comment #10 from Mark H Weaver  ---
I've encountered a similar problem, possibly related.  See bug #66917 for a
minimal C example program exhibiting the problem.


[Bug rtl-optimization/66922] New: wrong code for bit-field struct at -O1 and above on x86_64-linux-gnu

2015-07-17 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66922

Bug ID: 66922
   Summary: wrong code for bit-field struct at -O1 and above on
x86_64-linux-gnu
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The current gcc trunk mis-compiles the following code on x86_64-linux-gnu at
-O1 and above in the 64-bit mode (but not in the 32-bit mode). 

This is a regression from 5.1.x.


$ gcc-trunk -v  
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 6.0.0 20150717 (experimental) [trunk revision 225918] (GCC) 
$ 
$ gcc-trunk -m64 -O0 small.c; ./a.out
$ gcc-5.1 -m64 -O1 small.c; ./a.out
$ gcc-trunk -m32 -O1 small.c; ./a.out
$ 
$ gcc-trunk -m64 -O1 small.c
$ ./a.out
Aborted (core dumped)
$ 


--


struct S 
{
  int:31;
  int:2;
  int f0:16;
  int f1;
  int f2;
};

int 
main ()
{
  struct S a = { 1, 0, 0 };

  if (a.f0 != 1)
__builtin_abort(); 

  return 0;
}


[Bug rtl-optimization/66865] [6 Regression] wine64 segfaults from gcc in trunk (r225757) (regression)

2015-07-17 Thread austinenglish at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66865

--- Comment #15 from austinenglish at gmail dot com ---
(In reply to Uroš Bizjak from comment #14)
> Can you please retry now that PR 66782 and PR 66838 are both fixed on
> mainline and gcc-5 branch?

Works here in r225965 / da5e6421269c9683f17fb5e6e3bacfec50f22239.

[Bug target/66906] [4.9/5/6] gcc.dg/torture/stackalign/nested-1.c fails on ICE with -O0 -m32 -mregparm=3 or -miamcu

2015-07-17 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66906

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from H.J. Lu  ---
Fixed.


[Bug target/66906] [4.9/5/6] gcc.dg/torture/stackalign/nested-1.c fails on ICE with -O0 -m32 -mregparm=3 or -miamcu

2015-07-17 Thread hjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66906

--- Comment #5 from hjl at gcc dot gnu.org  ---
Author: hjl
Date: Fri Jul 17 23:02:25 2015
New Revision: 225974

URL: https://gcc.gnu.org/viewcvs?rev=225974&root=gcc&view=rev
Log:
Replicate static chain on the stack

If we put static chain on the stack, we need to replicate it on the stack
when stack is realigned with DRAP so that static chain can be reached via
(argp - 2) slot.

gcc/

PR target/66906
* config/i386/i386.c (ix86_expand_prologue): Replicate static
chain on the stack.

gcc/testsuite/

PR target/66906
* gcc.target/i386/pr66906.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/i386/pr66906.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog


[Bug target/66922] wrong code for bit-field struct at -O1 and above on x86_64-linux-gnu

2015-07-17 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66922

Uroš Bizjak  changed:

   What|Removed |Added

 Target||x86
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2015-07-17
  Component|rtl-optimization|target
   Target Milestone|--- |4.9.4
 Ever confirmed|0   |1

--- Comment #1 from Uroš Bizjak  ---
Confirmed, we have to reject non-integer ratios of pos/size from
ix86_expand_pinsr and ix86_expand_pextr.

Will fix tomorrow.

  1   2   >