[Bug fortran/78534] Use a larger integer type for character lengths on 64-bit targets

2016-11-26 Thread jb at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78534

Janne Blomqvist  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |jb at gcc dot gnu.org

--- Comment #3 from Janne Blomqvist  ---
(In reply to Jerry DeLisle from comment #1)
> (In reply to Janne Blomqvist from comment #0)
> > Currently GFortran uses a plain C int for character lengths. This prevents
> > longer characters on 64-bit targets. We should change to use size_t instead,
> > similar to the C string functions (str*(), mem*()), malloc(), etc. Also
> > Intel Fortran does this nowadays.
> > 
> > Now that the libgfortran ABI version has been bumped, it is the right time
> > to do this.
> > 
> > See also https://gcc.gnu.org/wiki/LibgfortranAbiCleanup
> 
> Agree, Are you going to do this?

I'm working on a patch. I have managed to make it work except for the
char_result_8.f90 testcase, which fails with an internal compiler error in the
middle end when optimization is enabled. So it seems I'm passing the middle-end
some nonsensical data.

Also the patch so far changes the charlen type to ptrdiff_t, there are some
places in the frontend where we use a negative charlen as a flag value. I
though I'd get the size change working first before tackling the
signed->unsigned change.

[Bug fortran/78534] Use a larger integer type for character lengths on 64-bit targets

2016-11-26 Thread jb at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78534

--- Comment #4 from Janne Blomqvist  ---
Created attachment 40154
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40154&action=edit
Preliminary patch

Preliminary patch changing gfc_charlen_t from int to ptrdiff_t. Fails the
char_result_8.f90 testcase.

[Bug fortran/78534] Use a larger integer type for character lengths on 64-bit targets

2016-11-26 Thread jb at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78534

--- Comment #5 from Janne Blomqvist  ---
(In reply to Jakub Jelinek from comment #2)
> So are you going to do everything that is in the wiki (or most of it)?
> Also, I couldn't find in the list, I think some descriptor changes were
> considered (to use 15 dimensions instead of 7, etc.).

The array descriptor changes are on the fortran-dev branch, which apparently
isn't ready for merging yet. So it seems we'll bump the ABI both for GCC 7 and
for GCC 8.. :(

The plan was to do all the changes at once so we don't have to bump the ABI
many times, but it was accidentally broken for GCC 7 before fortran-dev was
ready.

As for the rest of the list, we'll see. I don't have that much time myself, but
maybe if the other maintainers would take an interest.

[Bug fortran/78534] Use a larger integer type for character lengths on 64-bit targets

2016-11-26 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78534

--- Comment #6 from Jakub Jelinek  ---
(In reply to Janne Blomqvist from comment #5)
> (In reply to Jakub Jelinek from comment #2)
> > So are you going to do everything that is in the wiki (or most of it)?
> > Also, I couldn't find in the list, I think some descriptor changes were
> > considered (to use 15 dimensions instead of 7, etc.).
> 
> The array descriptor changes are on the fortran-dev branch, which apparently
> isn't ready for merging yet. So it seems we'll bump the ABI both for GCC 7
> and for GCC 8.. :(

Which exact change broke the ABI, couldn't it be adjusted to be backwards ABI
compatible and do the full ABI break in GCC 8?

[Bug tree-optimization/78533] tree check fail in int_fits_type_p, at tree.c:9153

2016-11-26 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78533

--- Comment #3 from David Binderman  ---
Seems to be no problem by the time we get to revision 242887, dated 20161126.

[Bug tree-optimization/78540] New: [6/7 Regression] ICE: in df_refs_verify, at df-scan.c:4062 with -O -march=core2

2016-11-26 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78540

Bug ID: 78540
   Summary: [6/7 Regression] ICE: in df_refs_verify, at
df-scan.c:4062 with -O -march=core2
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
 Build: x86_64-pc-linux-gnu

Created attachment 40155
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40155&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -march=core2 testcase.c
testcase.c: In function 'fn1':
testcase.c:7:1: warning: AVX512F vector return without AVX512F enabled changes
the ABI [-Wpsabi]
 {
 ^
testcase.c:6:1: note: The ABI for passing parameters with 64-byte alignment has
changed in GCC 4.6
 fn1 (V a)
 ^~~
testcase.c: In function 'fn2':
testcase.c:23:1: internal compiler error: in df_refs_verify, at df-scan.c:4062
 }
 ^
0x7bfc90 df_refs_verify
/repo/gcc-trunk/gcc/df-scan.c:4062
0x7c483e df_insn_refs_verify
/repo/gcc-trunk/gcc/df-scan.c:4129
0x7c69ce df_bb_verify
/repo/gcc-trunk/gcc/df-scan.c:4154
0x7c6e87 df_scan_verify()
/repo/gcc-trunk/gcc/df-scan.c:4286
0x7af588 df_verify()
/repo/gcc-trunk/gcc/df-core.c:1831
0x7af60a df_analyze_1
/repo/gcc-trunk/gcc/df-core.c:1217
0x8e16b2 thread_prologue_and_epilogue_insns()
/repo/gcc-trunk/gcc/function.c:5947
0x8e1e82 rest_of_handle_thread_prologue_and_epilogue
/repo/gcc-trunk/gcc/function.c:6427
0x8e1e82 execute
/repo/gcc-trunk/gcc/function.c:6469
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-242884-checking-yes-rtl-df-extra-nographite-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--without-cloog --without-ppl --without-isl --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-242884-checking-yes-rtl-df-extra-nographite-amd64
Thread model: posix
gcc version 7.0.0 20161125 (experimental) (GCC) 


--enable-checking=df might be needed in order to reproduce.


Tested revisions:
r242884 - FAIL
6-branch r242029 - FAIL
5-branch r242028 - OK

[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2016-11-26 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |janus at gcc dot gnu.org

--- Comment #12 from janus at gcc dot gnu.org ---
The patch in comment #1 still works and regtests fine. I'll take care of
committing it ...

[Bug sanitizer/78541] New: [7 Regression] ICE when compiling libquadmath/printf/printf_fp.c with -fsanitize=address

2016-11-26 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78541

Bug ID: 78541
   Summary: [7 Regression] ICE when compiling
libquadmath/printf/printf_fp.c with -fsanitize=address
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: sanitizer
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dominiq at lps dot ens.fr
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 40156
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40156&action=edit
Preprocessed file

Compiling libquadmath/printf/printf_fp.c with -fsanitize=address gives the
following ICE:

% gfc ~/Desktop/printf_fp.i -fsanitize=address -c
../../../work/libquadmath/printf/printf_fp.c: In function
'__quadmath_printf_fp':
../../../work/libquadmath/printf/printf_fp.c:127:1: internal compiler error: in
asan_expand_mark_ifn, at asan.c:2716

../../../work/libquadmath/printf/printf_fp.c:127:1: internal compiler error:
Abort trap: 6

The code compiles with revision r240271 (2016-09-20), but not with r241924
(2016-11-07) and gcc has to be configured with --enable-checking=yes. The
culprit could be r241896.

[Bug tree-optimization/78542] New: [7 Regression] wrong code at -Og results in endless loop

2016-11-26 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78542

Bug ID: 78542
   Summary: [7 Regression] wrong code at -Og results in endless
loop
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
 Build: x86_64-pc-linux-gnu

Created attachment 40157
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40157&action=edit
reduced testcase

Output:
$ x86_64-pc-linux-gnu-gcc -Og testcase.c -Wno-psabi
$ ulimit -t 5
$ ./a.out 
Killed

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-242884-checking-yes-rtl-df-extra-nographite-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--without-cloog --without-ppl --without-isl --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-242884-checking-yes-rtl-df-extra-nographite-amd64
Thread model: posix
gcc version 7.0.0 20161125 (experimental) (GCC) 

It seems that the "x = 1;" assignment is not present in the generated code.

Tested revisions:
trunk r242884 - FAIL
6-branch r242029 - OK

[Bug fortran/78534] Use a larger integer type for character lengths on 64-bit targets

2016-11-26 Thread jb at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78534

--- Comment #7 from Janne Blomqvist  ---
(In reply to Jakub Jelinek from comment #6)
> (In reply to Janne Blomqvist from comment #5)
> > (In reply to Jakub Jelinek from comment #2)
> > > So are you going to do everything that is in the wiki (or most of it)?
> > > Also, I couldn't find in the list, I think some descriptor changes were
> > > considered (to use 15 dimensions instead of 7, etc.).
> > 
> > The array descriptor changes are on the fortran-dev branch, which apparently
> > isn't ready for merging yet. So it seems we'll bump the ABI both for GCC 7
> > and for GCC 8.. :(
> 
> Which exact change broke the ABI, couldn't it be adjusted to be backwards
> ABI compatible and do the full ABI break in GCC 8?

It was the DTIO (derived type I/O) stuff (which certainly is a major feature,
so I'm not suggesting that it should be backed out). Subsequently there has
AFAICS been other patches that have changed the ABI too, IIRC the DEC
compatibility stuff at least.

I tried to suggest trying to fix it here:
https://gcc.gnu.org/ml/gcc-patches/2016-10/msg01987.html . But nobody (except
me, apparently?) took it seriously, and with me having extremely limited time
for GFortran these days, it seems we'll have an ABI break for both GCC 7 and 8.

[Bug fortran/78534] Use a larger integer type for character lengths on 64-bit targets

2016-11-26 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78534

--- Comment #8 from Dominique d'Humieres  ---
Will it help for pr66310?

[Bug fortran/78534] Use a larger integer type for character lengths on 64-bit targets

2016-11-26 Thread jb at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78534

--- Comment #9 from Janne Blomqvist  ---
(In reply to Dominique d'Humieres from comment #8)
> Will it help for pr66310?

Probably yes, to the extent that with 64-bit indices the repeat count can be a
lot larger than you can afford to buy RAM. :)

I ran into a similar issues as in that PR, and put in an arbitrary limit in the
frontend simplicitation function of 4 MB.

[Bug bootstrap/78531] [7 Regression] gnat bootstrap broken on linux targets with _FORTIFY_SOURCE enabled

2016-11-26 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78531

--- Comment #2 from Matthias Klose  ---
hmm, that doesn't look better:

Breakpoint 1, __GI___fortify_fail (msg=msg@entry=0x769f487d "buffer
overflow detected")
at fortify_fail.c:28
28  fortify_fail.c: No such file or directory.
(gdb) bt
#0  __GI___fortify_fail (msg=msg@entry=0x769f487d "buffer overflow
detected") at fortify_fail.c:28
#1  0x76980240 in __GI___chk_fail () at chk_fail.c:28
#2  0x006f7716 in build_raise_check(int, exception_info_kind) ()
#3  0x00706119 in gigi ()
#4  0x009e8c90 in back_end.call_back_end ()
#5  0x009e9af7 in gnat1drv ()
#6  0x006c89ed in gnat_parse_file() ()
#7  0x00d791cf in compile_file() ()
#8  0x006acc7f in toplev::main(int, char**) ()
#9  0x006aeff7 in main ()

[Bug target/78543] New: [6 Regression] ICE in push_reload, at reload.c:1349 on powerpc64le-linux-gnu

2016-11-26 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78543

Bug ID: 78543
   Summary: [6 Regression] ICE in push_reload, at reload.c:1349 on
powerpc64le-linux-gnu
   Product: gcc
   Version: 6.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

seen with the gcc-6-branch r242827, works with 5 and the trunk, works with -O2
instead of -O3:

$ cat message_print_format_dig.i 
char b[] = {};
short c, d;
int e, f;
short *g;
void h();
int i();
int t() {
  short j, s;
  unsigned k;
  int l;
  char m[65535];
  for (; s;)
if (i())
  return e;
  for (int o = 1; o < 4; o++)
for (unsigned n = d; n; n--) {
  if (i(f, m, sizeof(m)) < 0)
return e;
  char p = 0;
  c = *g;
  short q = 0, r = ({
 j = *g;
 (short)(j >> 8 & 255u | j << 8);
   });
  unsigned a = k + 4;
  if (b[o] && d) {
h(l, "%", &p);
h(l, "%7", &q);
while (k < a)
  h(c, r);
h("");
  }
}
}
$ gcc -O3 -c message_print_format_dig.i 
message_print_format_dig.i: In function 't':
message_print_format_dig.i:34:1: internal compiler error: in push_reload, at
reload.c:1349
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug tree-optimization/78542] [7 Regression] wrong code at -Og results in endless loop

2016-11-26 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78542

Marc Glisse  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-11-26
   Target Milestone|--- |7.0
 Ever confirmed|0   |1

--- Comment #1 from Marc Glisse  ---
Indeed. CCP4 says

Visiting PHI node: x_4 = PHI 

Argument #0 (2 -> 3 executable)
x_6(D)  Value: CONSTANT x_6(D)

Argument #1 (3 -> 3 not executable)

PHI node value: CONSTANT x_6(D)

and then proceeds with x_4 = x_6.

[Bug testsuite/78544] New: FAIL: gcc.dg/tree-prof/section-attr-*.c compilation, -fprofile-generate -D_PROFILE_GENERATE on darwin

2016-11-26 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78544

Bug ID: 78544
   Summary: FAIL: gcc.dg/tree-prof/section-attr-*.c compilation,
-fprofile-generate -D_PROFILE_GENERATE on darwin
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dominiq at lps dot ens.fr
CC: andrew.burgess at embecosm dot com, iains at gcc dot gnu.org
  Target Milestone: ---
  Host: x86_64-apple-darwin16
Target: x86_64-apple-darwin16
 Build: x86_64-apple-darwin16

Created attachment 40158
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40158&action=edit
Patch from Iain Sandoe

The tests gcc.dg/tree-prof/section-attr-*.c introduced at r242519 fail on
darwin with

section-attr-1.s:38:16: error: unexpected token in '.section' directive
.section .text

This is fixed by the attached patch from Iain Sandoe.

[Bug fortran/78534] Use a larger integer type for character lengths on 64-bit targets

2016-11-26 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78534

--- Comment #10 from Dominique d'Humieres  ---
BTW did you test the patch in comment 4 with -m32?

[Bug fortran/78545] New: Possible correction to online LTIME documentation

2016-11-26 Thread fran.pena at usc dot es
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78545

Bug ID: 78545
   Summary: Possible correction to online LTIME documentation
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: fran.pena at usc dot es
  Target Milestone: ---

The documentation page for LTIME
https://gcc.gnu.org/onlinedocs/gfortran/LTIME.html#LTIME states that:

Return value:
[...]
1. Seconds after the minute, range 0–59 or 0–61 to allow for leap
seconds
[...]
4. Day of month, range 0–31
[...]
8. Days since January 1 

The documentation should be corrected according to the mailing list message
https://gcc.gnu.org/ml/fortran/2016-11/msg00228.html. The suggested correction
is:

Return value:
[...]
1. Seconds after the minute, range 0–59 or 0–60 to allow for leap
seconds
[...]
4. Day of month, range 1–31
[...]
8. Days since January 1, range 0-365

[Bug fortran/78545] Possible correction to online LTIME documentation

2016-11-26 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78545

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-11-26
 CC||janus at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from janus at gcc dot gnu.org ---
It seems that the docu for GMTIME has the same issue - not only on the website,
but also in libgfortran/intrinsics/date_and_time.c.

Furthermore the doumentation for LTIME should link to the related functions
IDATE, ITIME and in particular the F95 standard intrinsic DATE_AND_TIME.

[Bug fortran/78545] Possible correction to online LTIME documentation

2016-11-26 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78545

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |dominiq at lps dot 
ens.fr

--- Comment #2 from Dominique d'Humieres  ---
I have a patch.

[Bug tree-optimization/78546] New: [6/7 Regression] wrong code at -O2 and above

2016-11-26 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546

Bug ID: 78546
   Summary: [6/7 Regression] wrong code at -O2 and above
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
 Build: x86_64-pc-linux-gnu

Created attachment 40159
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40159&action=edit
reduced testcase

Output:
$ x86_64-pc-linux-gnu-gcc -O2 testcase.c
$ ./a.out 
Aborted


$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-242884-checking-yes-rtl-df-extra-nographite-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--without-cloog --without-ppl --without-isl --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-242884-checking-yes-rtl-df-extra-nographite-amd64
Thread model: posix
gcc version 7.0.0 20161125 (experimental) (GCC) 


Tested revisions:
trunk r242884 - FAIL
6-branch r242029 - FAIL
5-branch r242028 - OK

[Bug tree-optimization/78546] [6/7 Regression] wrong code at -O2 and above

2016-11-26 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546

--- Comment #1 from Uroš Bizjak  ---
(In reply to Zdenek Sojka from comment #0)
> Created attachment 40159 [details]
> reduced testcase

The attached testcase is not executable.

[Bug bootstrap/78531] [7 Regression] gnat bootstrap broken on linux targets with _FORTIFY_SOURCE enabled

2016-11-26 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78531

--- Comment #3 from Eric Botcazou  ---
> hmm, that doesn't look better:
> 
> Breakpoint 1, __GI___fortify_fail (msg=msg@entry=0x769f487d "buffer
> overflow detected")
> at fortify_fail.c:28
> 28  fortify_fail.c: No such file or directory.
> (gdb) bt
> #0  __GI___fortify_fail (msg=msg@entry=0x769f487d "buffer overflow
> detected") at fortify_fail.c:28
> #1  0x76980240 in __GI___chk_fail () at chk_fail.c:28
> #2  0x006f7716 in build_raise_check(int, exception_info_kind) ()
> #3  0x00706119 in gigi ()
> #4  0x009e8c90 in back_end.call_back_end ()
> #5  0x009e9af7 in gnat1drv ()
> #6  0x006c89ed in gnat_parse_file() ()
> #7  0x00d791cf in compile_file() ()
> #8  0x006acc7f in toplev::main(int, char**) ()
> #9  0x006aeff7 in main ()

A little better though, thanks.  I guess it's this declaration in namet.h:

/* The global name buffer. */
struct Bounded_String
{
  Nat Max_Length;
  Nat Length;
  char Chars[1];
  /* The 1 here is wrong, but it doesn't matter, because all the code either
 goes by Length, or NUL-terminates the string before processing it. */
};

I thought this was a well-known allocation idiom in C++ because you don't have
flexible array members, do you?  That being said, I can put the real value.

[Bug bootstrap/78531] [7 Regression] gnat bootstrap broken on linux targets with _FORTIFY_SOURCE enabled

2016-11-26 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78531

Eric Botcazou  changed:

   What|Removed |Added

 Status|WAITING |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |ebotcazou at gcc dot 
gnu.org

--- Comment #4 from Eric Botcazou  ---
I guess we want to do something, although there's nothing broken.

[Bug fortran/78534] Use a larger integer type for character lengths on 64-bit targets

2016-11-26 Thread jb at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78534

--- Comment #11 from Janne Blomqvist  ---
(In reply to Dominique d'Humieres from comment #10)
> BTW did you test the patch in comment 4 with -m32?

No, though I did test by reverting the few lines changing the definitions of
gfc_charlen_type_node and gfc_charlen_t. The rest of the patch (i.e. the vast
majority) deals with fixing situations where we accidentally have used the
wrong types and it happened to work because the character length and plain
integer were the same thing. So this test showed that the patch didn't break
anything else.

[Bug tree-optimization/78546] [6/7 Regression] wrong code at -O2 and above

2016-11-26 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546

Zdenek Sojka  changed:

   What|Removed |Added

  Attachment #40159|0   |1
is obsolete||

--- Comment #2 from Zdenek Sojka  ---
Created attachment 40160
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40160&action=edit
reduced testcase (correct one)

[Bug rtl-optimization/78547] New: [7 Regression] ICE: in loc_cmp, at var-tracking.c:3417 with -Os -g -mstringop-strategy=libcall -freorder-blocks-algorithm=simple

2016-11-26 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78547

Bug ID: 78547
   Summary: [7 Regression] ICE: in loc_cmp, at var-tracking.c:3417
with -Os -g -mstringop-strategy=libcall
-freorder-blocks-algorithm=simple
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
 Build: x86_64-pc-linux-gnu

Created attachment 40161
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40161&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -Os -g -mstringop-strategy=libcall
-freorder-blocks-algorithm=simple testcase.c -Wno-psabi
testcase.c: In function 'fn1':
testcase.c:12:1: internal compiler error: in loc_cmp, at var-tracking.c:3417
 }
 ^
0xecc62f loc_cmp
/repo/gcc-trunk/gcc/var-tracking.c:3417
0xecd0bd onepart_variable_different_p
/repo/gcc-trunk/gcc/var-tracking.c:4913
0xedfd2f emit_notes_for_differences_1(variable**, hash_table*)
/repo/gcc-trunk/gcc/var-tracking.c:9084
0xeea048 void hash_table::traverse_noresize*,
&(emit_notes_for_differences_1(variable**, hash_table*))>(hash_table*)
/repo/gcc-trunk/gcc/hash-table.h:950
0xeea048 void hash_table::traverse*,
&(emit_notes_for_differences_1(variable**, hash_table*))>(hash_table*)
/repo/gcc-trunk/gcc/hash-table.h:972
0xee6f28 emit_notes_for_differences
/repo/gcc-trunk/gcc/var-tracking.c:9122
0xee6f28 vt_emit_notes
/repo/gcc-trunk/gcc/var-tracking.c:9503
0xee84a8 variable_tracking_main_1
/repo/gcc-trunk/gcc/var-tracking.c:10363
0xee84a8 variable_tracking_main()
/repo/gcc-trunk/gcc/var-tracking.c:10377
0xee84a8 execute
/repo/gcc-trunk/gcc/var-tracking.c:10414
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-242884-checking-yes-rtl-df-extra-nographite-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--without-cloog --without-ppl --without-isl --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-242884-checking-yes-rtl-df-extra-nographite-amd64
Thread model: posix
gcc version 7.0.0 20161125 (experimental) (GCC) 


Tested revisions:
trunk r242884 - FAIL
6-branch r242029 - OK

[Bug fortran/78545] Possible correction to online LTIME documentation

2016-11-26 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78545

--- Comment #3 from Dominique d'Humieres  ---
> Furthermore the documentation for LTIME should link to the related
> functions IDATE, ITIME and in particular the F95 standard intrinsic
> DATE_AND_TIME.

Is the following addition to GMTIME and LTIME OK?

This intrinsic routine is provided for backwards compatibility with 
GNU Fortran 77.  In new code, programmers should consider the use of 
the @ref{DATE_AND_TIME} intrinsic defined by the Fortran 90(95??) and later
standard(s??).

I am not fond to add more links to the F77 extensions: if done, it has to be
consistent for all of then. Not sure it worths the pain!

[Bug fortran/78545] Possible correction to online LTIME documentation

2016-11-26 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78545

--- Comment #4 from janus at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #3)
> > Furthermore the documentation for LTIME should link to the related
> > functions IDATE, ITIME and in particular the F95 standard intrinsic
> > DATE_AND_TIME.
> 
> Is the following addition to GMTIME and LTIME OK?
> 
> This intrinsic routine is provided for backwards compatibility with 
> GNU Fortran 77.  In new code, programmers should consider the use of 
> the @ref{DATE_AND_TIME} intrinsic defined by the Fortran 90(95??) and later
> standard(s??).

Yes, sounds good to me. The documentation says DATE_AND_TIME is from F95, so:
"... defined by Fortran 95 and later standards."

Or just: "... defined by the Fortran 95 standard".


> I am not fond to add more links to the F77 extensions: if done, it has to be
> consistent for all of then. Not sure it worths the pain!

Agreed. But it would be nice if the non-standard extensions would at least
refer to a standard alternative. So, all of LTIME, ITIME, IDATE should have a
"See also" section that lists DATE_AND_TIME.

[Bug fortran/78392] ICE in gfc_trans_auto_array_allocation, at fortran/trans-array.c:5979

2016-11-26 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78392

--- Comment #11 from janus at gcc dot gnu.org ---
As noted by Dominique, the problem here has originally been introduced by
r126826.

[Bug rtl-optimization/78547] [7 Regression] ICE: in loc_cmp, at var-tracking.c:3417 with -Os -g -mstringop-strategy=libcall -freorder-blocks-algorithm=simple

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78547

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug sanitizer/78541] [7 Regression] ICE when compiling libquadmath/printf/printf_fp.c with -fsanitize=address

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78541

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug c++/78504] Bad fixit hint: '_Pragma' does not name a type; did you mean '_Pragma'?

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78504

--- Comment #1 from Andrew Pinski  ---
Confirmed.

[Bug c++/78457] attempt to instantiate unused template

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78457

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
Not a bug as mentioned.

[Bug middle-end/78473] Enhancement request: __builtin_div_overflow

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78473

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-11-26
  Component|c++ |middle-end
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Confirmed.

[Bug middle-end/78540] [6/7 Regression] ICE: in df_refs_verify, at df-scan.c:4062 with -O -march=core2

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78540

Andrew Pinski  changed:

   What|Removed |Added

  Component|tree-optimization   |middle-end
   Target Milestone|--- |6.3

[Bug tree-optimization/78546] [6/7 Regression] wrong code at -O2 and above

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |6.3

[Bug target/78546] [6/7 Regression] wrong code at -O2 and above

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546

Andrew Pinski  changed:

   What|Removed |Added

  Component|tree-optimization   |target

--- Comment #3 from Andrew Pinski  ---
Works correctly on aarch64-linux-gnu.

[Bug tree-optimization/78528] Recursion not optimized for structs

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78528

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-11-26
Summary|Recursion not optimized in  |Recursion not optimized for
   |simple case |structs
 Ever confirmed|0   |1

--- Comment #2 from Andrew Pinski  ---
Confirmed.

[Bug c/78464] Feature request: automatic function multi versioning

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78464

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

[Bug middle-end/78391] g++ (any version) at O0 (for O1, O2, O3 is ok) doesn't warn when class members are used uninitialized.

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78391

Andrew Pinski  changed:

   What|Removed |Added

  Component|c++ |middle-end
   Severity|normal  |enhancement

[Bug c++/78504] Bad fixit hint: '_Pragma' does not name a type; did you mean '_Pragma'?

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78504

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-11-26
 Ever confirmed|0   |1

--- Comment #2 from Andrew Pinski  ---
.

[Bug c++/78349] function returning std::basic_string missing [abi:cxx11] tag

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78349

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |6.0

--- Comment #2 from Andrew Pinski  ---
Fixed.

[Bug tree-optimization/59642] Performance regression (4.7/4.8) with -ftree-loop-distribute-patterns

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59642

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization

--- Comment #3 from Andrew Pinski  ---
This works for me on the trunk on aarch64-linux-gnu.

[Bug c++/78345] [5/6/7 Regression] ICE on invalid c++ code on x86_64-linux-gnu (internal compiler error: in cxx_eval_outermost_constant_expr, at cp/constexpr.c:4464)

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78345

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |5.5

[Bug fortran/78356] [7 Regression] [OOP] segfault allocating polymorphic variable with polymorphic component with allocatable component

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78356

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug fortran/78299] [6 Regression] ICE in expand_omp_for_static_nochunk, at omp-low.c:9622

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78299

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |6.3

[Bug driver/49726] [5/6/7 Regression] -g0 file.S -g does not produce debug info

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49726

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |5.5
Summary|[4.4/5/6/7 Regression] -g0  |[5/6/7 Regression] -g0
   |file.S -g does not produce  |file.S -g does not produce
   |debug info  |debug info

[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug middle-end/78294] [5/6/7 Regression] -fsanitize=thread broken by ignoring __attribute__((tls_model("initial-exec")))

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78294

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |5.5

[Bug tree-optimization/78496] [7 Regression] Missed opportunities for jump threading

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78496

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug bootstrap/78531] [7 Regression] gnat bootstrap broken on linux targets with _FORTIFY_SOURCE enabled

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78531

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug fortran/78518] [6/7 Regression] Warning format regression

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78518

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |6.3

[Bug target/78543] [6 Regression] ICE in push_reload, at reload.c:1349 on powerpc64le-linux-gnu

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78543

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |6.3

[Bug tree-optimization/20514] hoisting of label out of jumptable would take place at cse, should happen at trees

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20514

--- Comment #7 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #2)
> Two things, we just don't jump thread.

The testcase in comment #2 works correctly on the trunk:
   [15.0%]:
  i_lsm.3_8 = i;
  switch (i_lsm.3_8)  [15.0%], case 5:  [85.0%]>

 [85.0%]:
  i = 4;

 [15.0%]:
  return 0;


That is no loop.

[Bug libstdc++/78441] [variant] variant_alternative doesn't allow cv qualifiers

2016-11-26 Thread timshen at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78441

--- Comment #1 from Tim Shen  ---
Author: timshen
Date: Sun Nov 27 00:32:04 2016
New Revision: 242892

URL: https://gcc.gnu.org/viewcvs?rev=242892&root=gcc&view=rev
Log:
PR libstdc++/78441
* include/std/variant: Propagate cv qualifications to types returned
by variant_alternative.
* testsuite/20_util/variant/compile.cc: Tests.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/variant
trunk/libstdc++-v3/testsuite/20_util/variant/compile.cc

[Bug c/78498] [7 Regression] valgrind conditional jump or move depends on uninitialised value(s) in format_type_warning

2016-11-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78498

Andrew Pinski  changed:

   What|Removed |Added

  Component|preprocessor|c
Summary|valgrind conditional jump   |[7 Regression] valgrind
   |or move depends on  |conditional jump or move
   |uninitialised value(s) in   |depends on uninitialised
   |format_type_warning |value(s) in
   ||format_type_warning

--- Comment #1 from Andrew Pinski  ---
Even though this code is new, this is a regression as this code is enabled by
default.