[Bug middle-end/82177] Alias analysis too aggressive with integer-to-pointer cast

2017-09-23 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82177

Eric Gallager  changed:

   What|Removed |Added

 CC||chengniansun at gmail dot com,
   ||egallager at gcc dot gnu.org

--- Comment #7 from Eric Gallager  ---
(In reply to rguent...@suse.de from comment #6)
> On Wed, 20 Sep 2017, kristerw at gcc dot gnu.org wrote:
> 
> > --- Comment #5 from Krister Walfridsson  ---
> > Did you mean PR61502 - "== comparison on "one-past" pointer gives wrong
> > result"?
> 
> Yes, but I believe there's another one where I posted a similar
> incomplete patch and explained why we can't possibly fix this
> without making points-to analysis useless.

bug 65752 perhaps?

[Bug target/82303] Better PIE/PIC code generation for kernel code (x86_64 & arm64)

2017-09-23 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82303

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-09-23
Version|unknown |8.0
 Ever confirmed|0   |1

[Bug target/82303] Better PIE/PIC code generation for kernel code (x86_64 & arm64)

2017-09-23 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82303

--- Comment #2 from H.J. Lu  ---
Created attachment 42232
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42232=edit
A patch to add -fstatic-PIE/-fstatic-pie

[Bug c++/66256] noexcept evaluation done before end of class

2017-09-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66256

Jonathan Wakely  changed:

   What|Removed |Added

 CC||serge.guelton@telecom-breta
   ||gne.eu

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

[Bug c++/82311] prototype don't match

2017-09-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82311

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Jonathan Wakely  ---
The noexcept condition is evaluated too early, before the class is complete, so
the third overload of fast is not considered. The out-of-class definition sees
all three overloads, so gets a different result.

This is a duplicate of Bug 66256.

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

[Bug c++/82311] New: prototype don't match

2017-09-23 Thread serge.guel...@telecom-bretagne.eu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82311

Bug ID: 82311
   Summary: prototype don't match
   Product: gcc
   Version: 7.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: serge.guel...@telecom-bretagne.eu
  Target Milestone: ---

The following code

```
template 
struct my_type {

  long fast(long i) const;
  long fast(long i) ;

  auto operator[](long i) const -> decltype(this->fast(i));

  template 
  auto fast(E const ) const -> decltype(expr.any());
};


template 
auto my_type::operator[](long i) const -> decltype(this->fast(i))
{
  return fast(i);
}
```

does not compile with gcc 7

$> g++ --version
g++-7 (Debian 7.2.0-5) 7.2.0

The error message is the following

bug.cc:15:6: error: prototype for ‘decltype (((const
my_type*)this)->my_type::fast(i)) my_type::operator
 auto my_type::operator[](long i) const -> decltype(this->fast(i))
  ^~~~
bug.cc:7:8: error: candidate is: decltype (((const
my_type*)this)->my_type::fast(i)) my_type::operator[]
   auto operator[](long i) const -> decltype(this->fast(i));
^~~~

And surprisingly enough, swaping the two last declarations in the structure
solve the issue.

[Bug c++/82310] Odd regression in g++-6.4.0 with a variable named major

2017-09-23 Thread dflogeras2 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82310

--- Comment #2 from Dave Flogeras  ---
Sorry for the noise, it seems to be a glibc bug.  Looks like it was fixed in
2.25 (too recent for my affected system).  In case anyone else hits it and
finds this bug, see below:

https://sourceware.org/bugzilla/show_bug.cgi?id=19239

[Bug c++/82309] Compiled binary received SIGSEGV when -g

2017-09-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309

--- Comment #5 from Andrew Pinski  ---
The temp variable goes out if scope is the result of v0 + v1. And not the auto.
 IIRC -fsanitize=undefined will catch this.

[Bug c++/82310] Odd regression in g++-6.4.0 with a variable named major

2017-09-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82310

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Andrew Pinski  ---
One of the headers are pulling in a header which is defining minor. This is not
a gcc  bug.

[Bug c++/82310] New: Odd regression in g++-6.4.0 with a variable named major

2017-09-23 Thread dflogeras2 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82310

Bug ID: 82310
   Summary: Odd regression in g++-6.4.0 with a variable named
major
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dflogeras2 at gmail dot com
  Target Milestone: ---

After upgrading to gcc-6.4.0, one of my regression tests fails to compile.  I
boiled it down to the following simple code which fails to compile, claiming
that "major" was not declared in this scope.  If I change that variable name to
something else (maj), it works.



#include 
#include 

int main() {
  const uint32_t minor( 0 );

  {
  uint32_t file_minor = 0;
  if( minor!= file_minor ) throw std::runtime_error( "version error" );
  }

}

[Bug c++/82309] Compiled binary received SIGSEGV when -g

2017-09-23 Thread sergio_nsk at yahoo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309

Sergey Markelov  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #4 from Sergey Markelov  ---
(In reply to Andrew Pinski from comment #3)
> You have a temporary which you are using after it has gone out of scope.

Thank you Andrew. Using 'auto' was my error. The proper line should be
Vector sum = v0 + v1 + v2;

(Sorry, if you try this updated line in the minimized bug.cpp, it will not
work. It is ok, it works in my full code with paradox templates).

[Bug c++/82309] Compiled binary received SIGSEGV when -g

2017-09-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309

--- Comment #3 from Andrew Pinski  ---
You have a temporary which you are using after it has gone out of scope.

[Bug c++/82309] Compiled binary received SIGSEGV when -g

2017-09-23 Thread sergio_nsk at yahoo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309

--- Comment #2 from Sergey Markelov  ---
Created attachment 42231
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42231=edit
Assembler

[Bug c++/82309] Compiled binary received SIGSEGV when -g

2017-09-23 Thread sergio_nsk at yahoo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309

--- Comment #1 from Sergey Markelov  ---
Created attachment 42230
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42230=edit
Preprocessed file

[Bug c++/82309] New: Compiled binary received SIGSEGV when -g

2017-09-23 Thread sergio_nsk at yahoo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309

Bug ID: 82309
   Summary: Compiled binary received SIGSEGV when -g
   Product: gcc
   Version: 5.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sergio_nsk at yahoo dot de
  Target Milestone: ---

Created attachment 42229
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42229=edit
Source code

I am learning expression templates. Compiled debug binary receives SIGSEGV on
line v3[0] = sum[0]. I occurs if any of -g, -O0 or -O1 flags is selected.

If I change line order like bellow, then SIGSEGV does not occur.

Vector v3(v0.size());

auto sum = v0 + v1 + v2;

I have minimize the code bug.cpp that demonstrates the issue.

$ g++ -v -save-temps -g -std=c++14 bug.cpp 
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-5 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --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-5-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--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 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-g' '-std=c++14' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/5/cc1plus -E -quiet -v -imultiarch
x86_64-linux-gnu -D_GNU_SOURCE bug.cpp -mtune=generic -march=x86-64 -std=c++14
-g -fworking-directory -fpch-preprocess -fstack-protector-strong -Wformat
-Wformat-security -o bug.ii
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/5"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/5/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/5
 /usr/include/x86_64-linux-gnu/c++/5
 /usr/include/c++/5/backward
 /usr/lib/gcc/x86_64-linux-gnu/5/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-g' '-std=c++14' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/5/cc1plus -fpreprocessed bug.ii -quiet -dumpbase
bug.cpp -mtune=generic -march=x86-64 -auxbase bug -g -std=c++14 -version
-fstack-protector-strong -Wformat -Wformat-security -o bug.s
GNU C++14 (Ubuntu 5.4.0-6ubuntu1~16.04.4) version 5.4.0 20160609
(x86_64-linux-gnu)
compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR
version 3.1.4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++14 (Ubuntu 5.4.0-6ubuntu1~16.04.4) version 5.4.0 20160609
(x86_64-linux-gnu)
compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR
version 3.1.4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: c3fdb80f2154421ceaf9e22c85325a8d
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-g' '-std=c++14' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'
 as -v --64 -o bug.o bug.s
GNU ассемблер, версия 2.26.1 (x86_64-linux-gnu); используется BFD версии (GNU
Binutils for Ubuntu) 2.26.1
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-g' '-std=c++14' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'
 

[Bug bootstrap/82306] [8 Regression] Revision r253089 breaks bootstrap on Darwin

2017-09-23 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82306

Uroš Bizjak  changed:

   What|Removed |Added

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

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

[Bug bootstrap/82306] [8 Regression] Revision r253089 breaks bootstrap on Darwin

2017-09-23 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82306

Uroš Bizjak  changed:

   What|Removed |Added

 Target||x86
   Target Milestone|--- |8.0

[Bug bootstrap/82306] [8 Regression] Revision r253089 breaks bootstrap on Darwin

2017-09-23 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82306

--- Comment #1 from uros at gcc dot gnu.org ---
Author: uros
Date: Sat Sep 23 14:26:06 2017
New Revision: 253118

URL: https://gcc.gnu.org/viewcvs?rev=253118=gcc=rev
Log:
PR bootstrap/82306
* config/i386/i386.opt (mprefer-avx256): Use
ix86_target_flags variable.
* config/i386/i386.c (ix86_target_string): Move
-mprefer-avx256 to flag2_opts.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/config/i386/i386.opt

[Bug c++/82308] New: [C++17] deduction of template arguments results in internal compiler error

2017-09-23 Thread sdalleig at mmci dot uni-saarland.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82308

Bug ID: 82308
   Summary: [C++17] deduction of template arguments results in
internal compiler error
   Product: gcc
   Version: 7.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sdalleig at mmci dot uni-saarland.de
  Target Milestone: ---

Please consider the following code (gcc.godbolt.org link:
https://godbolt.org/g/EX9Fko)

#include 

template 
class X {
public:
using T = std::array;

enum class C : uint8_t { A, B };
X(T bounds, C c = C::B) : t(bounds) {}

private:
T t;
};

// fix;
// template 
// X(std::array, ...)->X;

int main(void)
{
std::array a;
Xd{a}; //cannot be deduced
X<2> e{a}; // works
}

output: 
In constructor 'X::X(X::T, X::C)':
22 : :22:13: internal compiler error: unexpected expression 'R' of kind
template_parm_index

[Bug debug/47361] ICE: in build_abbrev_table, at dwarf2out.c:10477 with -g -feliminate-dwarf2-dups

2017-09-23 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47361

Zdenek Sojka  changed:

   What|Removed |Added

  Known to work||8.0

--- Comment #4 from Zdenek Sojka  ---
-feliminate-dwarf2-dups was removed in gcc 8.0.

[Bug fortran/82143] add a -fdefault-real-16 flag

2017-09-23 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82143

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |8.0

--- Comment #18 from janus at gcc dot gnu.org ---
Fixed with r253117. Closing.

[Bug fortran/82258] [8 regression] allocate_zerosize_3.f fails since r251949

2017-09-23 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82258

--- Comment #8 from Thomas Koenig  ---
Could you try the following program:

  program try_lf0030
  call LF0030(10)
  end

  SUBROUTINE LF0030(nf10)
  INTEGER ILA1(7)
  INTEGER ILA2(7)
  LOGICAL LLA(:,:,:,:,:,:,:)
  INTEGER ICA(7)
  ALLOCATABLE LLA


  ALLOCATE (LLA(2:3, 4, 0:5,
 $  NF10:1, -2:7, -3:8,
 $  -4:9))

  ILA1 = LBOUND(LLA)
  ILA2 = UBOUND(LLA)
  print *,ila1
  print *,ila2

  END SUBROUTINE

and report its output?

On the machines I have access to, the output is

   2   1   0   1  -2  -3   
  -4
   3   4   5   0   7   8   
   9

[Bug fortran/82143] add a -fdefault-real-16 flag

2017-09-23 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82143

--- Comment #17 from janus at gcc dot gnu.org ---
Author: janus
Date: Sat Sep 23 13:15:20 2017
New Revision: 253117

URL: https://gcc.gnu.org/viewcvs?rev=253117=gcc=rev
Log:
2017-09-23  Janus Weil  

PR fortran/82143
* lang.opt: Add the options -fdefault-real-10 and -fdefault-real-16.
Rename flag_default_real to flag_default_real_8.
* invoke.texi: Add documentation.
* module.c (use_iso_fortran_env_module): flag_default_real is renamed.
* trans-types.c (gfc_init_kinds): Implement the flags
-fdefault-real-10 and -fdefault-real-16. Make -fdefault-double-8 work
without -fdefault-real-8.

2017-09-23  Janus Weil  

PR fortran/82143
* gfortran.dg/promotion_3.f90: New test case.
* gfortran.dg/promotion_4.f90: New test case.

Added:
trunk/gcc/testsuite/gfortran.dg/promotion_3.f90
trunk/gcc/testsuite/gfortran.dg/promotion_4.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/invoke.texi
trunk/gcc/fortran/lang.opt
trunk/gcc/fortran/module.c
trunk/gcc/fortran/trans-types.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/25829] [F03] Asynchronous IO support

2017-09-23 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25829

Thomas Koenig  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||tkoenig at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |koenigni at gcc dot 
gnu.org

--- Comment #25 from Thomas Koenig  ---
Just to make sure there is no double work here :-)

[Bug c++/82307] New: unscoped enum-base incorrect cast

2017-09-23 Thread pro100fifa at ukr dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82307

Bug ID: 82307
   Summary: unscoped enum-base incorrect cast
   Product: gcc
   Version: 6.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pro100fifa at ukr dot net
  Target Milestone: ---

Created attachment 42228
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42228=edit
The code have a bug

Hello to GCC ( g++ ) developers!
My English is bad, but i hope you will understand me.

I found a bug ( if it is ) in g++ 6.4.0 version ( and earlier ).
I will just provide a code which have the bug:

/* Begin */
#include 

enum : unsigned long long { VAL };


void foo( unsigned long long )
{
std::cout << "unsigned long long" << std::endl;
}

void foo( int )
{
std::cout << "int" << std::endl;
}


int main( void )
{
foo( VAL );
}
/* End */

I compiled this code in a Unix-like environment and command-line interface for
Microsoft Windows -- Cygwin ( 64-bit ). I used following compiler options:
-Wall -Wextra -std=c++17 

The following error messages were displayed:
C:\Users\Maxim\Desktop\test.cpp: In function ‘int main()’:
C:\Users\Maxim\Desktop\test.cpp:19:14: error: call of overloaded
‘foo()’ is ambiguous
 foo( VAL );
  ^
C:\Users\Maxim\Desktop\test.cpp:6:6: note: candidate: void foo(long long
unsigned int)
 void foo( unsigned long long )
  ^~~
C:\Users\Maxim\Desktop\test.cpp:11:6: note: candidate: void foo(int)
 void foo( int )
  ^~~


Thank you.

[Bug bootstrap/82306] [8 Regression] Revision r253089 breaks bootstrap on Darwin

2017-09-23 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82306

Iain Sandoe  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-09-23
 Ever confirmed|0   |1

[Bug bootstrap/82306] New: [8 Regression] Revision r253089 breaks bootstrap on Darwin

2017-09-23 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82306

Bug ID: 82306
   Summary: [8 Regression] Revision r253089 breaks bootstrap on
Darwin
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: iains at gcc dot gnu.org
  Target Milestone: ---

Bootstrap fails early in stage1 with

In file included from ./tm.h:16:0,
 from /src-local/gcc-trunk/gcc/gencheck.c:23:
./options.h:5803:2: error: #error too many target masks
 #error too many target masks
  ^
make[3]: *** [build/gencheck.o] Error 1

===

I assume this is because we've now used up all the mask bits and Darwin delares
an additional one in config/darwin.opt 'Mask(MACHO_DYNAMIC_NO_PIC)'

NOTE: that Darwin is not the only x86 platform to do this:

$ grep -r Mask\( gcc/config/*.opt
gcc/config/darwin.opt:Target Common Report Mask(MACHO_DYNAMIC_NO_PIC)
gcc/config/linux-android.opt:Target Report Mask(ANDROID) Var(flag_android)
Init(ANDROID_DEFAULT ? OPTION_MASK_ANDROID : 0)
gcc/config/vxworks.opt:Target Report RejectNegative Mask(VXWORKS_RTP)
Condition(VXWORKS_KIND == VXWORKS_KIND_NORMAL)

So there might be other broken ports.

[Bug c/82296] Warn for code removal due to "code never accesses array out of bounds" assumption

2017-09-23 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82296

--- Comment #5 from Thomas Koenig  ---
Also see

https://www.securecoding.cert.org/confluence/display/c/ARR30-C.+Do+not+form+or+use+out-of-bounds+pointers+or+array+subscripts

[Bug c/82305] New: gcc.c-torture/execute/20000822-1.c fails on x86_64 Cygwin

2017-09-23 Thread pen7cmc at yahoo dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82305

Bug ID: 82305
   Summary: gcc.c-torture/execute/2822-1.c fails on x86_64
Cygwin
   Product: gcc
   Version: 7.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pen7cmc at yahoo dot com
  Target Milestone: ---

CYGWIN_NT-10.0 2.9.0(0.318/5/3) 2017-09-12 10:18 x86_64 Cygwin

The --with-isl=/usr/local below is because ISL 0.14 is the version Cygwin's
setup-x86_64.exe program downloads, below what gcc 7.2.0 needs.  I installed
ISL 0.18 in /usr/local.

../configure --prefix=/opt/etsf --with-local-prefix=/opt/etsf/usr/local
--enable-languages=c,c++,fortran --with-isl=/usr/local
make -j 2
make check 

From /usr/tmp/gcc-7.2.0/objdir/./gcc/testsuite/gcc/gcc.log:
FAIL: gcc.c-torture/execute/2822-1.c   -O0  execution test
FAIL: gcc.c-torture/execute/2822-1.c   -O1  execution test
FAIL: gcc.c-torture/execute/2822-1.c   -O2  execution test
FAIL: gcc.c-torture/execute/2822-1.c   -O3 -g  execution test
FAIL: gcc.c-torture/execute/2822-1.c   -Os  execution test
FAIL: gcc.c-torture/execute/2822-1.c   -O2 -flto -fno-use-linker-plugin
-flto-partition=none  execution test
FAIL: gcc.c-torture/execute/2822-1.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  execution test

From /usr/tmp/gcc-7.2.0/objdir/./gcc/testsuite/gcc/gcc.sum:
FAIL: gcc.c-torture/execute/2822-1.c   -O0  execution test
Executing on host: /usr/tmp/gcc-7.2.0/objdir/gcc/xgcc
-B/usr/tmp/gcc-7.2.0/objdir/gcc/
/usr/tmp/gcc-7.2.0/gcc/testsuite/gcc.c-torture/
execute/2822-1.c  -fno-diagnostics-show-caret -fdiagnostics-color=never   
-O1  -w  -o ./2822-1.exe(timeout = 300)
spawn /usr/tmp/gcc-7.2.0/objdir/gcc/xgcc -B/usr/tmp/gcc-7.2.0/objdir/gcc/
/usr/tmp/gcc-7.2.0/gcc/testsuite/gcc.c-torture/execute/2
822-1.c -fno-diagnostics-show-caret -fdiagnostics-color=never -O1 -w -o
./2822-1.exe
PASS: gcc.c-torture/execute/2822-1.c   -O1  (test for excess errors)
Setting LD_LIBRARY_PATH to
:/usr/tmp/gcc-7.2.0/objdir/gcc::/usr/tmp/gcc-7.2.0/objdir/gcc:/cygdrive/c/windows/SYSTEM32:/cygdrive/c/wind
ows/System32:/usr/bin:/usr/local/lib/:/opt/etsf/lib:/usr/lib
spawn [open ...]
FAIL: gcc.c-torture/execute/2822-1.c   -O1  execution test
Executing on host: /usr/tmp/gcc-7.2.0/objdir/gcc/xgcc
-B/usr/tmp/gcc-7.2.0/objdir/gcc/
/usr/tmp/gcc-7.2.0/gcc/testsuite/gcc.c-torture/
execute/2822-1.c  -fno-diagnostics-show-caret -fdiagnostics-color=never   
-O2  -w  -o ./2822-1.exe(timeout = 300)
spawn /usr/tmp/gcc-7.2.0/objdir/gcc/xgcc -B/usr/tmp/gcc-7.2.0/objdir/gcc/
/usr/tmp/gcc-7.2.0/gcc/testsuite/gcc.c-torture/execute/2
822-1.c -fno-diagnostics-show-caret -fdiagnostics-color=never -O2 -w -o
./2822-1.exe
PASS: gcc.c-torture/execute/2822-1.c   -O2  (test for excess errors)
Setting LD_LIBRARY_PATH to
:/usr/tmp/gcc-7.2.0/objdir/gcc::/usr/tmp/gcc-7.2.0/objdir/gcc:/cygdrive/c/windows/SYSTEM32:/cygdrive/c/wind
ows/System32:/usr/bin:/usr/local/lib/:/opt/etsf/lib:/usr/lib
spawn [open ...]
FAIL: gcc.c-torture/execute/2822-1.c   -O2  execution test
Executing on host: /usr/tmp/gcc-7.2.0/objdir/gcc/xgcc
-B/usr/tmp/gcc-7.2.0/objdir/gcc/
/usr/tmp/gcc-7.2.0/gcc/testsuite/gcc.c-torture/
execute/2822-1.c  -fno-diagnostics-show-caret -fdiagnostics-color=never   
-O3 -g  -w  -o ./2822-1.exe(timeout = 300)
spawn /usr/tmp/gcc-7.2.0/objdir/gcc/xgcc -B/usr/tmp/gcc-7.2.0/objdir/gcc/
/usr/tmp/gcc-7.2.0/gcc/testsuite/gcc.c-torture/execute/2
822-1.c -fno-diagnostics-show-caret -fdiagnostics-color=never -O3 -g -w -o
./2822-1.exe
PASS: gcc.c-torture/execute/2822-1.c   -O3 -g  (test for excess errors)
Setting LD_LIBRARY_PATH to
:/usr/tmp/gcc-7.2.0/objdir/gcc::/usr/tmp/gcc-7.2.0/objdir/gcc:/cygdrive/c/windows/SYSTEM32:/cygdrive/c/wind
ows/System32:/usr/bin:/usr/local/lib/:/opt/etsf/lib:/usr/lib
spawn [open ...]
FAIL: gcc.c-torture/execute/2822-1.c   -O3 -g  execution test
Executing on host: /usr/tmp/gcc-7.2.0/objdir/gcc/xgcc
-B/usr/tmp/gcc-7.2.0/objdir/gcc/
/usr/tmp/gcc-7.2.0/gcc/testsuite/gcc.c-torture/
execute/2822-1.c  -fno-diagnostics-show-caret -fdiagnostics-color=never   
-Os  -w  -o ./2822-1.exe(timeout = 300)
spawn /usr/tmp/gcc-7.2.0/objdir/gcc/xgcc -B/usr/tmp/gcc-7.2.0/objdir/gcc/
/usr/tmp/gcc-7.2.0/gcc/testsuite/gcc.c-torture/execute/2
822-1.c -fno-diagnostics-show-caret -fdiagnostics-color=never -Os -w -o
./2822-1.exe
PASS: gcc.c-torture/execute/2822-1.c   -Os  (test for excess errors)
Setting LD_LIBRARY_PATH to
:/usr/tmp/gcc-7.2.0/objdir/gcc::/usr/tmp/gcc-7.2.0/objdir/gcc:/cygdrive/c/windows/SYSTEM32:/cygdrive/c/wind
ows/System32:/usr/bin:/usr/local/lib/:/opt/etsf/lib:/usr/lib
spawn [open ...]
FAIL: gcc.c-torture/execute/2822-1.c   -Os  execution test
Executing on host: /usr/tmp/gcc-7.2.0/objdir/gcc/xgcc

[Bug target/82196] -mcall-ms2sysv-xlogues stubs sometimes use wrong MOV instruction

2017-09-23 Thread dansan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82196

--- Comment #5 from dansan at gcc dot gnu.org ---
Author: dansan
Date: Sat Sep 23 11:02:54 2017
New Revision: 253116

URL: https://gcc.gnu.org/viewcvs?rev=253116=gcc=rev
Log:
PR target/82196 addendum: Fix Darwin build breakage and test FAILS on Solaris

gcc/testsuite:
* gcc.target/i386/pr82196-1.c: (b): Remove volatile asm.
* gcc.target/i386/pr82196-2.c: (b): Likewise.

libgcc:
* configure.ac: Add Check for HAVE_AS_AVX.
* config.in: Regenerate.
* configure: Likewise.
* config/i386/i386-asm.h: Include auto-target.h from libgcc.
(SSE_SAVE, SSE_RESTORE): Emit .byte sequence for !HAVE_AS_AVX.
Correct out-of-date comments.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/pr82196-1.c
trunk/gcc/testsuite/gcc.target/i386/pr82196-2.c
trunk/libgcc/ChangeLog
trunk/libgcc/config.in
trunk/libgcc/config/i386/i386-asm.h
trunk/libgcc/configure
trunk/libgcc/configure.ac