[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #23 from Andreas Schwab  ---
#c18 fixes the ICE on m68k which had the same problem as ia64.

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #22 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #17 from Alexandre Oliva  ---
> Rainier, I wasn't sure how "same" the bootstrap failure you'd observed was,
> that's why I'd asked for a preprocessed testcase.  Now, since the patch fixed
> the problem, nevermind.  I'll look into the regression, though since it 
> remains
> it's unlikely to be the same underlying issue.  It's quite plausible that it's
> also caused by the SFN patchset, just like the failures Joseph mentioned.

I've just finished a fresh sparc-sun-solaris2.11 bootstrap with the
three patches of yours + Jakub's (from the PR, assuming they are
identical to what you posted to gcc-patches).  Both the bootstrap
failure and the testsuite regression are gone, so we're back to normal.

Thanks for the quick fixes.

Rainer

[Bug tree-optimization/83312] [8 regression] bogus -Warray-bounds warning

2017-12-13 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83312

--- Comment #8 from Arnd Bergmann  ---
(In reply to David Malcolm from comment #7)
> Candidate patch:
>   https://gcc.gnu.org/ml/gcc-patches/2017-12/msg00778.html

I confirmed this fixes the problem on both the original source file as well as
the reduced test case.

[Bug c++/80026] [6/7/8 Regression] passing unresolved function pointer to variadic function template yields "too many arguments" error

2017-12-13 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80026

Paolo Carlini  changed:

   What|Removed |Added

 CC||paolo.carlini at oracle dot com

--- Comment #3 from Paolo Carlini  ---
Interestingly, clang issues essentially the same error.

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #28 from Andreas Schwab  ---
Reduced testcase for #c27:

int f1 (int);
int f2 (int);
int
foo (int f)
{
  return f1 (f) || f2 (f) != 0;
}

[Bug rtl-optimization/83327] Spilling into hard regs not taken into account in lra liveness analysis

2017-12-13 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83327

Tom de Vries  changed:

   What|Removed |Added

  Attachment #42850|0   |1
is obsolete||

--- Comment #4 from Tom de Vries  ---
Created attachment 42864
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42864=edit
Updated tentative patch

> I then added fixes in make_hard_regno_{born,dead} in the same style as the 
> fix 
> for PR82353, and that allowed the live info to be propagated.

I was missing this part, which makes sure that we don't mask out the
hard_regs_spilled_into during propagation:
...
@@ -1320,6 +1338,11 @@ lra_create_live_ranges_1 (bool all_p, bool dead_insn_p)
}   
   /* As we did not change CFG since LRA start we can use   
 DF-infrastructure solver to solve live data flow problem.  */  
+  for (int i = 0; i < FIRST_PSEUDO_REGISTER; ++i)  
+   {   
+ if (TEST_HARD_REG_BIT (hard_regs_spilled_into, i))
+   bitmap_clear_bit (_hard_regs_bitmap, i);
+   }   
   df_simple_dataflow   
(DF_BACKWARD, NULL, live_con_fun_0, live_con_fun_n, 
 live_trans_fun, _blocks,   
...

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #24 from Christophe Lyon  ---
Created attachment 42862
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42862=edit
Preprocessed file for arm-thumb

Compilation of this file with -mthumb makes the assembler complain with:
gload.s: Assembler messages:
gload.s: Error: unaligned opcodes detected in executable segment

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #25 from Christophe Lyon  ---
Created attachment 42863
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42863=edit
Assembler for arm-thumb

This is the assembler file created with -mthumb, for which gas complains.

[Bug c++/83406] GCC8 can't deduce lambda return type

2017-12-13 Thread ostash at ostash dot kiev.ua
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83406

--- Comment #1 from Viktor Ostashevskyi  ---
gcc version 8.0.0 20171213 (experimental) (GCC)

[Bug c/83407] New: Warn about unsigned size_t underflow

2017-12-13 Thread jg at jguk dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83407

Bug ID: 83407
   Summary: Warn about unsigned size_t underflow
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jg at jguk dot org
  Target Milestone: ---

Could GCC warn about this?

I expected
main.c:8:4: error: size_t underflow 'result'




//gcc -O2 -Wall -Wextra -Wpedantic -o main main.c

#include 

int main (void)
{
size_t value = 0;
size_t result = value - 1;

printf("result: %zu\n", result);

return 0;
}

[Bug target/378] [AIX] gcc cannot compile huge c file

2017-12-13 Thread lzsiga at freemail dot c3.hu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=378

lzsiga at mail dot ahiv.hu  changed:

   What|Removed |Added

 CC||lzsiga at freemail dot c3.hu

--- Comment #14 from lzsiga at mail dot ahiv.hu  
---
Problem still present in gcc-4.8.3 (AIX6/PowerPC/64bit); couldn't compile
'readelf.c' from 'GNU!binutils-2.29'. (Note: the problem has nothing to do with
the linking.)

[Bug c++/83406] New: GCC8 can't deduce lambda return type

2017-12-13 Thread ostash at ostash dot kiev.ua
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83406

Bug ID: 83406
   Summary: GCC8 can't deduce lambda return type
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ostash at ostash dot kiev.ua
  Target Milestone: ---

Following code:

-
class Foo{};

class Bar
{
public:
  const Foo& getFoo() const;
  Foo& getFoo();
};

auto getter = [](const Bar& bar) -> decltype(auto) { return bar.getFoo(); };
-

is reject with GCC8 trunk with:
error: inconsistent types 'Foo' and 'const Foo&' deduced for lambda return type
 auto getter = [](const Bar& bar) -> decltype(auto) { return bar.getFoo(); };
   ^

GCC6, GCC7 and Clang are ok with it in both C++14/C++17 modes.

[Bug libstdc++/59568] complex type operator>> does not set eofbit for input streams.

2017-12-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59568

--- Comment #6 from Jonathan Wakely  ---
The simplest fix is just:

--- a/libstdc++-v3/include/std/complex
+++ b/libstdc++-v3/include/std/complex
@@ -495,6 +495,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   _Tp __re_x, __im_x;
   _CharT __ch;
   __is >> __ch;
+  if (!__is)
+   return __is;
   if (__ch == '(')
{
  __is >> __re_x >> __ch;


i.e. don't use putback if we didn't extract a character, so don't clear the
eofbit unless there's actually something to putback.

But the current implementation has other problems, like not doing a putback for
the character extracted when a ',' or ')' is not found.

This is closely related to https://wg21.link/lwg2714

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #27 from Andreas Schwab  ---
On ia64, even after applying all patches, there is still an ICE:

configure:4279: /usr/local/gcc/test/Build/./gcc/xgcc
-B/usr/local/gcc/test/Build/./gcc/ -B/usr/ia64-suse-linux/bin/
-B/usr/ia64-suse-linux/lib/ -isystem /usr/ia64-suse-linux/include -isystem
/usr/ia64-suse-linux/sys-include-o conftest -g -O2   conftest.c  >&5
during RTL pass: mach
conftest.c: In function 'main':
conftest.c:41:1: internal compiler error: in vt_initialize, at
var-tracking.c:10185
 }
 ^
0x4182a3bf vt_initialize
../../gcc/var-tracking.c:10185
0x4182ac0f variable_tracking_main_1
../../gcc/var-tracking.c:10433
0x4182ac0f variable_tracking_main()
../../gcc/var-tracking.c:10488
0x418d22ff ia64_reorg
../../gcc/config/ia64/ia64.c:9913
0x40f63c8f execute
../../gcc/reorg.c:3948
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
configure:4279: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/;
| /* end confdefs.h.  */
| /* none */
| static long int longval () { return (long int) (sizeof (double)); }
| static unsigned long int ulongval () { return (long int) (sizeof (double)); }
| #include 
| #include 
| int
| main ()
| {
| 
|   FILE *f = fopen ("conftest.val", "w");
|   if (! f)
| return 1;
|   if (((long int) (sizeof (double))) < 0)
| {
|   long int i = longval ();
|   if (i != ((long int) (sizeof (double
|   return 1;
|   fprintf (f, "%ld", i);
| }
|   else
| {
|   unsigned long int i = ulongval ();
|   if (i != ((long int) (sizeof (double
|   return 1;
|   fprintf (f, "%lu", i);
| }
|   /* Do not output a trailing newline, as this causes \r\n confusion
|  on some platforms.  */
|   return ferror (f) || fclose (f) != 0;
| 
|   ;
|   return 0;
| }

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

Christophe Lyon  changed:

   What|Removed |Added

 CC||clyon at gcc dot gnu.org

--- Comment #21 from Christophe Lyon  ---
FWIW, I also noticed the failure reported on pr69102 on aarch64 and arm.

I didn't check the patch in comment #19 yet.

[Bug c++/81061] [7/8 Regression] ICE modifying read-only variable

2017-12-13 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81061

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com

--- Comment #2 from Paolo Carlini  ---
Seems easy to avoid.

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #26 from Christophe Lyon  ---
I have attached gload.i and gload.s to help you reproduce the problem on arm
--with-mode=thumb.

I will also perform some tests with the patch series posted here.

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #31 from Jakub Jelinek  ---
Created attachment 42866
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42866=edit
gcc8-pr83396.patch

Variant patch, with assert checking.

[Bug tree-optimization/83410] New: [8 regression] libgomp.graphite/force-parallel-4.c etc. FAIL

2017-12-13 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83410

Bug ID: 83410
   Summary: [8 regression] libgomp.graphite/force-parallel-4.c
etc. FAIL
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ro at gcc dot gnu.org
CC: law at gcc dot gnu.org
  Target Milestone: ---
Target: sparc-sun-solaris2.11, i686-pc-linux-gnu,
x86_64-pc-linux-gnu

Between 20171212 (r255584) and 20171213 (r255603), a few testsuite regressions
occured:

+FAIL: libgomp.graphite/force-parallel-4.c scan-tree-dump-times graphite "2
loops carried no dependency" 1 (found 0 times)
+FAIL: libgomp.graphite/force-parallel-4.c scan-tree-dump-times optimized
"loopfn.1" 4 (found 0 times)
+FAIL: libgomp.graphite/force-parallel-8.c scan-tree-dump-times graphite "5
loops carried no dependency" 1 (found 0 times)

I'm seeing them on 32 and 64-bit Solaris/SPARC, according to gcc-testresults
they
also occur on Linux/x86 and Linux/x86_64.  In that revision range, the only 
plausible candidate is

2017-12-12  Jeff Law  <l...@redhat.com>

PR tree-optimization/83298
PR tree-optimization/83362
PR tree-optimization/83383
* gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Make
push_value_range a public interface.  Add new argument to
record_ranges_from_stmt.
[...]

[Bug tree-optimization/83410] [8 regression] libgomp.graphite/force-parallel-4.c etc. FAIL

2017-12-13 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83410

Rainer Orth  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug target/83408] microblaze: long compile times

2017-12-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83408

--- Comment #1 from Richard Biener  ---
I think we have a dup somewhere for i?86.  find_base_term is quadratic.

[Bug rtl-optimization/83398] [8 Regression] ICE: in try_ready, at haifa-sched.c:7524 with -O2 -fsched2-use-superblocks -g

2017-12-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83398

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug target/83399] Power8 ICE During LRA with 2-op rtl pattern for lvx instruction

2017-12-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83399

Richard Biener  changed:

   What|Removed |Added

 Target||powerpc64le

--- Comment #1 from Richard Biener  ---
Which GCC version?  Please fill out Version.

[Bug target/83408] New: microblaze: long compile times

2017-12-13 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83408

Bug ID: 83408
   Summary: microblaze: long compile times
   Product: gcc
   Version: 7.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: arnd at linaro dot org
  Target Milestone: ---

Created attachment 42869
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42869=edit
drivers/net/ethernet/cisco/enic/enic_main.c, preprocessed and compressed

Building an 'allmodconfig' linux kernel for microblaze gets stuck in a couple
of files that take several hours to compile on a fast machine. 'perf'
shows the time is spent mostly in two functions:

  88.17%  cc1  cc1 [.] find_base_term
   9.47%  cc1  cc1 [.]
cselib_sp_based_value_p
   ...


reproduce with "microblaze-linux-gcc-7.2.1 -O2 -c enic_main.i". An older
compiler version I happened to have (gcc-4.9.3) behaves similarly. I did not
wait for the compilation to finish but saw in older build reports that it
eventually continued or crashed.

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #32 from Christophe Lyon  ---
(In reply to Christophe Lyon from comment #26)
> I have attached gload.i and gload.s to help you reproduce the problem on arm
> --with-mode=thumb.
> 
> I will also perform some tests with the patch series posted here.

Applying patches from comments 15,18,19 and 20 fixes the problems I saw on arm:
- build now completes with -mthumb
- pr69102 passes

Thanks

[Bug target/83405] [8 Regression] bootstrap fails building a hppa64 compiler using gcc-8 trunk

2017-12-13 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83405

--- Comment #1 from Matthias Klose  ---
still seen with r255604, and the proposed patch from
https://gcc.gnu.org/ml/gcc-patches/2017-12/msg00811.html

[Bug rtl-optimization/83393] [8 Regression] wrong code with -O2 -fno-forward-propagate -fno-tree-bit-ccp

2017-12-13 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83393

--- Comment #4 from Segher Boessenkool  ---
Author: segher
Date: Wed Dec 13 14:05:57 2017
New Revision: 255606

URL: https://gcc.gnu.org/viewcvs?rev=255606=gcc=rev
Log:
combine: Fix PR83393

In move_deaths we move a REG_DEAD note if the instruction combination
has extended the lifetime of a register so that the existing note is
no longer valid.  We find that note using reg_stat, but what that finds
can refer to a later insn.  If so, we cannot use the cached value.  This
patch implements that.


PR rtl-optimization/83393
* combine.c (move_deaths): If reg_stat points to a too new insn in
last_death, do not use it: find the proper insn instead.

gcc/testsuite/
PR rtl-optimization/83393
* gcc.dg/pr83393.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/pr83393.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/combine.c
trunk/gcc/testsuite/ChangeLog

[Bug rtl-optimization/83393] [8 Regression] wrong code with -O2 -fno-forward-propagate -fno-tree-bit-ccp

2017-12-13 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83393

Segher Boessenkool  changed:

   What|Removed |Added

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

--- Comment #5 from Segher Boessenkool  ---
Fixed.  Thanks for the report!

[Bug c++/81276] Function multiversioning doesn't work with C++ templates

2017-12-13 Thread h2+bugs at fsfe dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81276

Hannes Hauswedell  changed:

   What|Removed |Added

 CC||h2+bugs at fsfe dot org

--- Comment #2 from Hannes Hauswedell  ---
target_clones does however work with templates:
https://gcc.godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(j:1,source:'%23include+%3Ccstdint%3E%0A%0Atemplate+%3Ctypename+int_t%3E%0A__attribute__((target_clones(%22default%22,+%22popcnt%22)))%0Auint64_t+pc(int_t+const+v)%0A%7B%0Areturn+__builtin_popcountll(v)%3B%0A%7D%0A%0Aint+main()%0A%7B%0Afor+(uint64_t+i+%3D+0%3B+i+%3C+1!'000!'000!'000%3B+%2B%2Bi)%0Avolatile+uint64_t+ret+%3D+pc(i)%3B%0A%7D'),l:'5',n:'0',o:'C%2B%2B+source+%231',t:'0')),k:50,l:'4',n:'0',o:'',s:0,t:'0'),(g:!((h:compiler,i:(compiler:g72,filters:(b:'0',binary:'1',commentOnly:'0',demangle:'0',directives:'0',execute:'1',intel:'0',trim:'0'),libs:!(),options:'-O3+-DNDEBUG',source:1),l:'5',n:'0',o:'x86-64+gcc+7.2+(Editor+%231,+Compiler+%231)',t:'0')),k:50,l:'4',n:'0',o:'',s:0,t:'0')),l:'2',n:'0',o:'',t:'0')),version:4

[Bug rtl-optimization/83327] Spilling into hard regs not taken into account in lra liveness analysis

2017-12-13 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83327

--- Comment #5 from Tom de Vries  ---
tentative patch mentioned here:
https://gcc.gnu.org/ml/gcc-patches/2017-12/msg00813.html

[Bug c++/83400] g++ -O1 doesn't execute any code in destructors with a throw statement if it sees another throw

2017-12-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83400

--- Comment #2 from Jonathan Wakely  ---
If the destructor uses a dynamic exception-specification then it works
correctly:

~ThrowInDtor() throw(long) {


in dtor
terminate called after throwing an instance of 'long'
Aborted (core dumped)

[Bug target/83409] New: arc: "internal compiler error: in extract_constrain_insn" with -O3

2017-12-13 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83409

Bug ID: 83409
   Summary: arc: "internal compiler error: in
extract_constrain_insn" with -O3
   Product: gcc
   Version: 7.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: arnd at linaro dot org
  Target Milestone: ---

Created attachment 42870
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42870=edit
linux/lib/scatterlist.c, preprocessed and compressed

I get several internal compiler errors building linux 'allmodconfig' with
arc-elf-gcc-7.2.1:

/home/arnd/cross-gcc/bin/arc-elf-gcc-7.2.1 -Wall -O3 -c lib/scatterlist.i
-fno-strict-aliasing

/git/arm-soc/lib/scatterlist.c: In function '__sg_alloc_table_from_pages':
/git/arm-soc/lib/scatterlist.c:445:1: error: insn does not satisfy its
constraints:
 }
 ^
(insn 735 249 620 23 (set (reg:SI 60 lp_count [477])
(plus:SI (mult:SI (reg:SI 60 lp_count [375])
(const_int 4 [0x4]))
(const_int -20 [0xffec])))
"/git/arm-soc/lib/scatterlist.c":139 89 {*add_n}
 (nil))
/git/arm-soc/lib/scatterlist.c:445:1: internal compiler error: in
extract_constrain_insn, at recog.c:2213
0x95a673 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/home/arnd/git/gcc/gcc/rtl-error.c:108
0x95a69f _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/home/arnd/git/gcc/gcc/rtl-error.c:119
0x927aad extract_constrain_insn(rtx_insn*)
/home/arnd/git/gcc/gcc/recog.c:2213
0x92adf4 copyprop_hardreg_forward_1
/home/arnd/git/gcc/gcc/regcprop.c:801
0x92bad7 execute
/home/arnd/git/gcc/gcc/regcprop.c:1308
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug c++/83116] [6/7/8 Regression] Statement with no effect causes wrong code of static object constexpr method

2017-12-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83116

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #3 from Marek Polacek  ---
Seems this is not about cv_cache/fold_cache; the bug is present even if I
disable putting anything into those caches.

[Bug c++/83322] [8 Regression] r255469 causes: ICE: tree check: expected class ‘type’, have ‘exceptional’ (baselink) in diag_attr_exclusions, at attribs.c:393

2017-12-13 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83322

--- Comment #4 from Markus Trippelsdorf  ---
Another variant:

struct A {
  void foo();
};
struct B {
  bool foo;
};
struct C : A, B {
  __attribute__((warn_unused_result)) int foo();
};

trippels@gcc67 ~ % g++ -Wall -c nsHttpHandler.ii
nsHttpHandler.ii:8:47: internal compiler error: tree check: expected class
‘type’, have ‘exceptional’ (tree_list) in diag_attr_exclusions, at
attribs.c:393
   __attribute__((warn_unused_result)) int foo();
   ^
0x82f443 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
../../gcc/gcc/tree.c:9153
0x66892f tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
../../gcc/gcc/tree.h:3242
0x66892f diag_attr_exclusions
../../gcc/gcc/attribs.c:393
0xac239f diag_attr_exclusions
../../gcc/gcc/attribs.c:376
0xac415f decl_attributes(tree_node**, tree_node*, int, tree_node*)
../../gcc/gcc/attribs.c:702
0x97fe70 cplus_decl_attributes(tree_node**, tree_node*, int)
../../gcc/gcc/cp/decl2.c:1508
0x96703c grokfndecl
../../gcc/gcc/cp/decl.c:8844
0x978dfc grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
../../gcc/gcc/cp/decl.c:11987
0x984d78 grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*,
bool, tree_node*, tree_node*)
../../gcc/gcc/cp/decl2.c:829
0x9f9e6a cp_parser_member_declaration
../../gcc/gcc/cp/parser.c:23842
0x9fadaa cp_parser_member_specification_opt
../../gcc/gcc/cp/parser.c:23316
0x9fadaa cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:22458
0x9fce09 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:22710
0x9fce09 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:16718
0xa09f1c cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:13579
0xa0f810 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:12888
0xa107e8 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:12835
0xa14732 cp_parser_declaration
../../gcc/gcc/cp/parser.c:12733
0xa14b71 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:12609
0xa14e64 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4558

[Bug target/81616] Update -mtune=generic for the current Intel and AMD processors

2017-12-13 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81616

Martin Jambor  changed:

   What|Removed |Added

 CC||jamborm at gcc dot gnu.org

--- Comment #38 from Martin Jambor  ---
Created attachment 42872
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42872=edit
Untested fix for harmful FMAs

(In reply to Jan Hubicka from comment #25)
> Hi, I agree that the matric multiplication fma issue is
> important and hopefully it will be fixed for GCC 8.  See
> https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00437.html

I am testing the attached patch to address the FMA generation.  I plan
to submit it to the mailing list this week if everything goes fine but
I would be very grateful for any comments or additional
testing/benchmarking.

The patch brings the run-time of the matrix.c testcase with native
znver1 tuning down to the levels seen with generic tuning, without it
I see 60% regressions at both -O2 and -O3.  (Even with the patch,
using -mprefer-vector-width=256 can still do quite a bit better but at
least the difference is now 20% and not 100%).

[Bug tree-optimization/83410] [8 regression] libgomp.graphite/force-parallel-4.c etc. FAIL

2017-12-13 Thread dje at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83410

David Edelsohn  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-12-13
 Ever confirmed|0   |1

--- Comment #1 from David Edelsohn  ---
Confirmed.

[Bug c++/83116] [6/7/8 Regression] Statement with no effect causes wrong code of static object constexpr method

2017-12-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83116

--- Comment #4 from Marek Polacek  ---
Ah, the result seems to be cached in constexpr_call_table!  I'll keep lookin'.

[Bug c/83397] void f() { } has zero arguments

2017-12-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83397

--- Comment #5 from Jonathan Wakely  ---
(In reply to jos...@codesourcery.com from comment #3)
> DR#317 explicitly confirms that () is not a prototype in a function 
> definition.

Which is why I set the status to NEW to confirm the bug.

> It's not valid in ISO C to call a variadic function without a prototype in 
> scope.  To the extent that GCC allows for it, presumably it's for 
> compatibility with code that e.g. calls printf without including 
> .

Which seems to (very slightly) pessimize correct code for the benefit of
undefined code (unless I'm mistaken GCC no longer supports any traditional
pre-C89 dialect).

[Bug c++/15272] lookup, dependent base

2017-12-13 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15272

--- Comment #17 from Nathan Sidwell  ---
Author: nathan
Date: Wed Dec 13 12:40:45 2017
New Revision: 255605

URL: https://gcc.gnu.org/viewcvs?rev=255605=gcc=rev
Log:
[PR C++/15272] lookups with ambiguating dependent base

https://gcc.gnu.org/ml/gcc-patches/2017-12/msg00766.html
PR c++/15272
* pt.c (tsubst_baselink): Don't repeat the lookup for
non-dependent baselinks.

PR c++/15272
* g++.dg/template/pr71826.C: Adjust for 15272 fix.

Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/template/pr71826.C

[Bug c++/15272] lookup, dependent base

2017-12-13 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15272

Nathan Sidwell  changed:

   What|Removed |Added

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

--- Comment #18 from Nathan Sidwell  ---
Fixed r255605.

[Bug c++/43282] GCC looks into dependent bases during unqualified lookup

2017-12-13 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43282
Bug 43282 depends on bug 15272, which changed state.

Bug 15272 Summary: lookup, dependent base
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15272

   What|Removed |Added

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

[Bug tree-optimization/83198] [7/8 regression] ICE in format_floating, at gimple-ssa-sprintf.c:1900

2017-12-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83198

--- Comment #2 from Jakub Jelinek  ---
Created attachment 42868
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42868=edit
gcc8-pr83198.patch

Untested fix.  It is wrong to derive precision from TREE_TYPE (arg), it might
not be a floating point type at all, or it might be an incompatible one.
Furthermore, if arg has incompatible type, we should just assume it is unknown
value.  1.0f promotion in argument passing to double of course works.

[Bug c/83407] Warn about unsigned size_t underflow

2017-12-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83407

--- Comment #3 from Jonathan Wakely  ---
(In reply to Jonny Grant from comment #2)
> Hello Richard
> 
> Static analysis could spot this example case?

But there's nothing wrong with your example. It creates the maximum value of
type size_t and prints it ... that's perfectly valid.

> Is there a legitimate case?

Yes, of course there are legitimate use cases for a fundamental property of
unsigned types that is how they've worked for decades.

Off the top of my head, various bitwise manipulations for rounding values up or
down to the next power-of-two, e.g. for finding correct alignment, rely on the
fact that unsigned integers wrap instead of overflowing.

If you don't want modulo arithmetic, don't use unsigned types. Using signed
types for indices means you get the usual arithmetic rules and can check for
values less than zero, instead of getting huge positive values.

[Bug c++/12944] [meta-bug] C++ name-lookup problems

2017-12-13 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12944
Bug 12944 depends on bug 15272, which changed state.

Bug 15272 Summary: lookup, dependent base
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15272

   What|Removed |Added

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

[Bug c++/83400] g++ -O1 doesn't execute any code in destructors with a throw statement if it sees another throw

2017-12-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83400

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-12-13
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
Reduced:

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

struct ThrowInDtor{
~ThrowInDtor() noexcept(false) {
puts("in dtor");
throw 1L;
}
};

int main() {
try {
ThrowInDtor throws;
throw 1;
} catch (int) {
// unreachable
}
}

terminate called after throwing an instance of 'int'
Aborted (core dumped)


The code is misoptimized to:


;; Function int main() (main, funcdef_no=3, decl_uid=2299, cgraph_uid=3,
symbol_order=3) (executed once)

int main() ()
{
  void * _4;
  void * _11;

   [100.00%]:
  _4 = __cxa_allocate_exception (4);
  MEM[(int *)_4] = 1;
  __cxa_throw (_4, &_ZTIi, 0B);

 [0.00%]:
  puts ("in dtor");
  _11 = __cxa_allocate_exception (8);
  MEM[(long int *)_11] = 1;
  __cxa_throw (_11, &_ZTIl, 0B);

}

It seems the catch(int) has been optimized away and so the destructor never
even runs, we just terminate with an uncaught exception.

[Bug c++/83406] [8 Regression] GCC8 can't deduce lambda return type

2017-12-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83406

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-12-13
 Ever confirmed|0   |1

[Bug target/47988] ICE: in reload_cse_simplify_operands, at postreload.c:403: insn does not satisfy its constraints

2017-12-13 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47988

--- Comment #2 from Zdenek Sojka  ---
(In reply to Dominique d'Humieres from comment #1)
> Are sure that the expected values after cshift are right?
> 
> Is the problem still present?

The testcase was reduced from testsuite/gfortran.dg/cshift_large_1.f90

I can not reproduce it anymore with trunk.

[Bug c/83407] Warn about unsigned size_t underflow

2017-12-13 Thread jg at jguk dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83407

--- Comment #2 from Jonny Grant  ---
Hello Richard

Static analysis could spot this example case?

Is there a legitimate case?

I can only think of something like this with a cast :-

size_t max_val = (size_t)-1;

[Bug c++/79650] [6/7/8 Regression] ICE on invalid c++ code with label arithmetic in convert_nontype_argument (pt.c:6515)

2017-12-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79650

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek  ---
This used to be rejected:
/opt/notnfs/gcc-bisect/obj/gcc/cc1plus.174880 -quiet -std=c++0x pr79650.C
pr79650.C: In function ‘void foo()’:
pr79650.C:8:47: error: conversion of expression ‘&& M’ of pointer type cannot
yield a constant expression
pr79650.C:8:48: error: template argument 1 is invalid
pr79650.C:8:51: error: invalid type in declaration before ‘;’ token
then it turned into error-recovery ICE (dunno exactly, maybe r174882 or
r174883):
/opt/notnfs/gcc-bisect/obj/gcc/cc1plus.174891 -quiet -std=c++0x pr79650.C
pr79650.C: In function ‘void foo()’:
pr79650.C:8:47: error: conversion of expression ‘&& M’ of pointer type cannot
yield a constant expression
pr79650.C:8:48: internal compiler error: in convert_nontype_argument, at
cp/pt.c:5410
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
and finally it is ice-on-invalid-code:
/opt/notnfs/gcc-bisect/obj/gcc/cc1plus.182470 -quiet -std=c++0x pr79650.C
pr79650.C: In function ‘void foo()’:
pr79650.C:8:48: internal compiler error: in convert_nontype_argument, at
cp/pt.c:5818
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
likely starting with r182470.

I think we need to reject subtraction of LABEL_DECLs perhaps cast to some other
type, unless they are the same.

[Bug target/13515] `asm' operand requires impossible reload

2017-12-13 Thread jason.duerstock at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13515

Jason Duerstock  changed:

   What|Removed |Added

 CC||jason.duerstock at gmail dot 
com

--- Comment #3 from Jason Duerstock  ---
For giggles, I just tried the test case on ia64, and it compiled successfully
with GCC 7.2.

[Bug tree-optimization/83403] Missed register promotion opportunities in loop

2017-12-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83403

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-12-13
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
LIM has difficulties in disambiguating the 10 C[] refs against each other,
restrict doesn't help here.  LIM uses its own dependence code, not relying on
the data-dependence framework.

An issue might be that we can't expand (long unsigned int) (_286 + 1) further
in affine combination speak but we do expand (long unsigned int) (_286).
This results in

  /* The expansion of addresses may be a bit expensive, thus we only do
 the check at -O2 and higher optimization levels.  */
  if (optimize < 2)
return true;

  get_inner_reference_aff (mem1->mem.ref, , );
  get_inner_reference_aff (mem2->mem.ref, , );
  aff_combination_expand (, ttae_cache);
  aff_combination_expand (, ttae_cache);
  aff_combination_scale (, -1);
  aff_combination_add (, );

  if (aff_comb_cannot_overlap_p (, size1, size2))
return false;

ending up with

1603  if (aff_comb_cannot_overlap_p (, size1, size2))
(gdb) p debug_aff ()
{
  type = sizetype
  offset = 0
  elements = {
[0] = (long unsigned int) (_286 + 1) * 8, 
[1] = (long unsigned int) (l_n_70 * 10) *
0xfff8
  }
}

where _286 is the definition of l_n_70 * 10.

Note that also SCEV / data-ref analysis doesn't see the consecutive accesses,
likely because of the similar issue of the addresses being of the form

*( + (long unsigned int)((l_n_70 * 10) + l_m) * 8)

where there is possible wrapping in the l_n_70 * 10 + l_m computation in
unsigned int type.  loop bounds of course make it obvious this isn't the
case.

Let me see if I can cook up sth with a patch I have lying around providing
sth like get_range_info () for GENERIC exprs.  That way we could enhance
chrec_convert (and also affine_comb_expand).

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #33 from Jakub Jelinek  ---
I can reproduce the -fcompare-debug failure with cross to aix with the whole
patchset, creduce is running now.

[Bug c++/83181] [C++17] Invalid deduction guide accepted

2017-12-13 Thread rs2740 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83181

TC  changed:

   What|Removed |Added

 CC||rs2740 at gmail dot com

--- Comment #1 from TC  ---
What's happening here is that a deduction failure occurs with the deduction
guide (substitution yields a template non-type parameter of type void whose
argument also can't be deduced) and so it is eliminated from the overload set,
but there's still an implicit guide generated from the constructor and the
deduction is done from that.

[temp.param]/15 proscribes deduction guide templates with a template parameter
that neither is deducible nor has a default argument, so this should be
diagnosed.

[Bug c++/82235] Copy ctor is not found for copying array of an object when it's marked explicit

2017-12-13 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82235

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-12-14
 CC|mukesh.kapoor at oracle dot com|
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com
 Ever confirmed|0   |1

--- Comment #2 from Paolo Carlini  ---
Mine.

[Bug tree-optimization/83418] New: [8 Regression] ICE in extract_range_for_var_from_comparison_expr, at vr-values.c:448

2017-12-13 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83418

Bug ID: 83418
   Summary: [8 Regression] ICE in
extract_range_for_var_from_comparison_expr, at
vr-values.c:448
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-8.0.0-alpha20171210 snapshot (r255534) ICEs when compiling the following
snippet w/ -O1:

void
yj (int j4)
{
  int t3;

  for (t3 = 0; t3 < 6; ++t3)
{
  short int v4 = t3;

  if (v4 == j4 || v4 > t3)
for (;;)
  {
  }
}
}

% gcc-8.0.0-alpha20171210 -O1 -c g0qqlono.c
during GIMPLE pass: dom
g0qqlono.c: In function 'yj':
g0qqlono.c:2:1: internal compiler error: in
extract_range_for_var_from_comparison_expr, at vr-values.c:448
 yj (int j4)
 ^~
0x781b4b vr_values::extract_range_for_var_from_comparison_expr(tree_node*,
tree_code, tree_node*, tree_node*, value_range*)
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171210/work/gcc-8-20171210/gcc/vr-values.c:448
0x13eb9a0 evrp_range_analyzer::try_find_new_range(tree_node*, tree_node*,
tree_code, tree_node*)
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171210/work/gcc-8-20171210/gcc/gimple-ssa-evrp-analyze.c:87
0x13ec7d6
evrp_range_analyzer::record_ranges_from_incoming_edge(basic_block_def*)
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171210/work/gcc-8-20171210/gcc/gimple-ssa-evrp-analyze.c:196
0x13ecd1a evrp_range_analyzer::enter(basic_block_def*)
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171210/work/gcc-8-20171210/gcc/gimple-ssa-evrp-analyze.c:73
0xe17a06 dom_opt_dom_walker::before_dom_children(basic_block_def*)
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171210/work/gcc-8-20171210/gcc/tree-ssa-dom.c:1411
0x13d2147 dom_walker::walk(basic_block_def*)
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171210/work/gcc-8-20171210/gcc/domwalk.c:308
0xe1801f execute
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171210/work/gcc-8-20171210/gcc/tree-ssa-dom.c:704

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #58 from joseph at codesourcery dot com  ---
With the latest build-many-glibcs.py build 
, using 
GCC trunk r255614, ia64 fails with an ICE building libgcc, m68k fails with 
an ICE building glibc, sh fails with prev_nonnote_insn_bb and 
next_nonnote_insn_bb undeclared compiling insn-emit.c.  The other 
compilations pass (though it's always possible ICEs will appear in the 
glibcs build, building additional glibc variants and the glibc testsuite).

[Bug middle-end/78468] [8 regression] libgomp.c/reduction-10.c and many more FAIL

2017-12-13 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78468

--- Comment #45 from Eric Botcazou  ---
Author: ebotcazou
Date: Wed Dec 13 23:16:56 2017
New Revision: 255616

URL: https://gcc.gnu.org/viewcvs?rev=255616=gcc=rev
Log:
PR middle-end/78468
* emit-rtl.c (init_emit): Remove ??? comment.
* explow.c (get_dynamic_stack_size): Take known alignment of stack
pointer + STACK_DYNAMIC_OFFSET into account in lieu of STACK_BOUNDARY.
* config/sparc/sparc.h (INIT_EXPANDERS): In 32-bit mode, lower the
alignment of 3 virtual registers to BITS_PER_WORD.

* config/sparc/sparc.c (sparc_compute_frame_size): Simplify.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sparc/sparc.c
trunk/gcc/config/sparc/sparc.h
trunk/gcc/emit-rtl.c
trunk/gcc/explow.c

[Bug tree-optimization/83410] [8 regression] libgomp.graphite/force-parallel-4.c etc. FAIL

2017-12-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83410

--- Comment #4 from Jeffrey A. Law  ---
And of course there's cases where we depend on threading similar situations to
enable vectorization.  I loathe the idea of checking for graphite to determine
whether or not to thread these edges, it feels like an awful hack.

[Bug middle-end/78468] [8 regression] libgomp.c/reduction-10.c and many more FAIL

2017-12-13 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78468

Eric Botcazou  changed:

   What|Removed |Added

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

--- Comment #46 from Eric Botcazou  ---
.

[Bug libfortran/78549] Very slow formatted internal file output

2017-12-13 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78549

--- Comment #31 from Jerry DeLisle  ---
Author: jvdelisle
Date: Thu Dec 14 02:30:49 2017
New Revision: 255621

URL: https://gcc.gnu.org/viewcvs?rev=255621=gcc=rev
Log:
2017-12-12  Jerry DeLisle  

PR libgfortran/78549
* io/inquire.c (inquire_via_unit): Adjust test for existence for
pre-connected internal units.
* io/transfer.c (finalize_transfer): When done with a transfer
to internal units, free the format buffer and close the stream.
(st_read_done): Delete freeing the stream, now handled using
sclose in finalize_transfer. (st_write_done): Likewise.
* io/unit.c (get_unit): Return NULL for special reserved unit
numbers, signifying not accessible to the user.
(init_units): Insert the two special internal units into the
unit treap. This makes these unit structures available without
further allocations for later use by internal unit I/O. These
units are automatically deleted by normal program termination.
* io/unix.c (mem_close): Add a guard check to protect from double free.

Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/inquire.c
trunk/libgfortran/io/transfer.c
trunk/libgfortran/io/unit.c
trunk/libgfortran/io/unix.c

[Bug tree-optimization/83411] New: function multiversioning should clone the entire sub-callgraph

2017-12-13 Thread h2+bugs at fsfe dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83411

Bug ID: 83411
   Summary: function multiversioning should clone the entire
sub-callgraph
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: h2+bugs at fsfe dot org
  Target Milestone: ---

[is this component entry correct?]

The documentation of FMV states: This aim of this project is to make it really
easy for the developer to specify multiple versions of a function, each catered
to a specific target ISA feature. GCC then takes care of creating the
dispatching code necessary to execute the right function version.

This sounds really cool, but in practice there is the huge problem that FMV
does not apply to nested functions calls forcing the developer to move the FMV
to the bottom of the callgraph incurring a possibly huge run-time penalty due
to calling the dispatch ridiculously often.

I have described this problem in detail on my blog¹, but I think it should be
quite evident to you. I would humbly suggest adding something like

__attribute__((target_clone_trees("default", "popcnt")))

that recursively also clones the nested function calls (without additional
dispatch steps and working independent of inlining or not). For optimisations
that are then generated automatically or by builtins this would already solve
all my problems :)

For manually curated SIMD code however this touches on another problem with
current FMV: one cannot rely on macros for feature detection. To fix this one
needs another mechanism to be able to find out which features are available for
the code block currently being compiled. I am not a compiler expert, but I
guess it is not possible to make macros work, simply because they are evaluated
much earlier. But could the compiler provide constexpr feature variables to the
code?
Then one could simply "clone_tree" early and "if constexpr (__has_sse4) ...
else ..." in the actual funcion.

Thanks for reading all of this and you work on GCC in general!

¹ https://hannes.hauswedell.net/post/2017/12/09/fmv/

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #38 from Jakub Jelinek  ---
So a CODE_LABEL with NULL BLOCK_FOR_INSN?  Ugh, that sounds broken.
In the patch a workaround is of course easy, just replace:
+ if (BB_HEAD (BLOCK_FOR_INSN (last_label)) == last_label)
+   BLOCK_FOR_INSN (insn) = NULL;
with
+ if (BLOCK_FOR_INSN (last_label)
+ && BB_HEAD (BLOCK_FOR_INSN (last_label)) == last_label)
+   BLOCK_FOR_INSN (insn) = NULL;

[Bug rtl-optimization/82398] [8 Regression] error: qsort comparator non-negative on sorted output: 2 in fill_vec_av_set at gcc/sel-sched.c:3725

2017-12-13 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82398

--- Comment #5 from Alexander Monakov  ---
Author: amonakov
Date: Wed Dec 13 16:30:29 2017
New Revision: 255607

URL: https://gcc.gnu.org/viewcvs?rev=255607=gcc=rev
Log:
sel-sched: fix sel_rank_for_schedule for qsort (PR 82398)

PR rtl-optimization/82398
* sel-sched.c (sel_rank_for_schedule): Fix check for zero
EXPR_USEFULNESS in priority comparison.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/sel-sched.c

[Bug rtl-optimization/82398] [8 Regression] error: qsort comparator non-negative on sorted output: 2 in fill_vec_av_set at gcc/sel-sched.c:3725

2017-12-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82398

--- Comment #6 from Jakub Jelinek  ---
So fixed?  Or do you want to keep it open for some reason (and if yes, does it
have to be tracked as regression)?

[Bug target/81228] [7/8 Regression] ICE in gen_vec_cmpv2dfv2di, at config/aarch64/aarch64-simd.md:2508

2017-12-13 Thread sudi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81228

--- Comment #6 from sudi at gcc dot gnu.org ---
Submitted for review

https://gcc.gnu.org/ml/gcc-patches/2017-12/msg00838.html

[Bug tree-optimization/83412] GCC line directive suppresses warnings

2017-12-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83412

Martin Sebor  changed:

   What|Removed |Added

   Keywords||diagnostic
  Known to fail||5.4.0, 6.4.0, 7.2.0, 8.0

--- Comment #1 from Martin Sebor  ---
All releases as far back as 5.4 have this problem.

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #42 from Andreas Schwab  ---
Reconfigured with --without-buildconfig:

/ -B/usr/ia64-suse-linux/bin/ -nostdinc++
-B/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/src/.libs
-B/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/libsupc++/.libs 
-I/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/include/ia64-suse-linux
 -I/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/include 
-I/usr/local/gcc/test/libstdc++-v3/libsupc++
-L/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/src/.libs
-L/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/libsupc++/.libs
-fno-PIE -c  -DUSE_LIBUNWIND_EXCEPTIONS -DIN_GCC_FRONTEND -g -O2 -DIN_GCC
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror
-fno-common  -DHAVE_CONFIG_H -I. -Ic -I../../gcc -I../../gcc/c
-I../../gcc/../include -I../../gcc/../libcpp/include 
-I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber
-I../../gcc/../libbacktrace   -o c/c-typeck.o -MT c/c-typeck.o -MMD -MP -MF
c/.deps/c-typeck.TPo ../../gcc/c/c-typeck.c
during RTL pass: mach
../../gcc/c/c-typeck.c: In function ‘tree_node* build_unary_op(location_t,
tree_code, tree, bool)’:
../../gcc/c/c-typeck.c:4711:1: internal compiler error: in move_insn, at
haifa-sched.c:5465
 }
 ^
0x4363200f move_insn
../../gcc/haifa-sched.c:5465
0x4363757f commit_schedule
../../gcc/haifa-sched.c:6205
0x4363f40f schedule_block(basic_block_def**, void*)
../../gcc/haifa-sched.c:7040
0x438503af schedule_ebb(rtx_insn*, rtx_insn*, bool)
../../gcc/sched-ebb.c:537
0x4385126f schedule_ebbs()
../../gcc/sched-ebb.c:657
0x42c7b0cf ia64_reorg
../../gcc/config/ia64/ia64.c:9863
0x41e151af execute
../../gcc/reorg.c:3948
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
make[3]: *** [c/c-typeck.o] Error 1
make[3]: Leaving directory `/usr/local/gcc/test/Build/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/usr/local/gcc/test/Build'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/usr/local/gcc/test/Build'
make: *** [all] Error 2

[Bug libstdc++/59568] complex type operator>> does not set eofbit for input streams.

2017-12-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59568

--- Comment #7 from Jonathan Wakely  ---
Author: redi
Date: Wed Dec 13 17:02:14 2017
New Revision: 255608

URL: https://gcc.gnu.org/viewcvs?rev=255608=gcc=rev
Log:
PR libstdc++/59568 fix error handling for std::complex stream extraction

PR libstdc++/59568
* include/std/complex (operator>>): Implement proposed resolution to
LWG 2714. Use putback if and only if a character has been successfully
extracted but isn't a delimiter. Use ctype::widen and traits::eq when
testing if extracted characters match delimiters.
* testsuite/26_numerics/complex/dr2714.cc: New test.

Added:
trunk/libstdc++-v3/testsuite/26_numerics/complex/dr2714.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/complex

[Bug tree-optimization/82944] missing -Wstringop-truncation on strncpy due to system header macro

2017-12-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82944

Martin Sebor  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=83412

--- Comment #1 from Martin Sebor  ---
I wonder if this is caused by the same underlying bug as pr83412.

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #36 from Andreas Schwab  ---
/usr/local/gcc/test/Build/./prev-gcc/xg++
-B/usr/local/gcc/test/Build/./prev-gcc/ -B/usr/ia64-suse-linux/bin/ -nostdinc++
-B/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/src/.libs
-B/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/libsupc++/.libs 
-I/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/include/ia64-suse-linux
 -I/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/include 
-I/usr/local/gcc/test/libstdc++-v3/libsupc++
-L/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/src/.libs
-L/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/libsupc++/.libs
-fno-PIE -c  -DUSE_LIBUNWIND_EXCEPTIONS  -g -O2 -gtoggle -DIN_GCC
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror
-fno-common  -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/.
-I../../gcc/../include -I../../gcc/../libcpp/include 
-I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber
-I../../gcc/../libbacktrace   -o insn-recog.o -MT insn-recog.o -MMD -MP -MF
./.deps/insn-recog.TPo insn-recog.c
during RTL pass: mach
../../gcc/config/ia64/vect.md: In function ‘int recog_9(rtx, rtx_insn*, int*)’:
../../gcc/config/ia64/vect.md:1510:1: internal compiler error: Segmentation
fault
 (define_expand "vec_unpacks_lo_"
 ^
0x41feac6f crash_signal
../../gcc/toplev.c:325
0x42c64c9f emit_insn_group_barriers
../../gcc/config/ia64/ia64.c:7106
0x42c7b10f ia64_reorg
../../gcc/config/ia64/ia64.c:9872
0x41e151af execute
../../gcc/reorg.c:3948
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
make[3]: *** [insn-recog.o] Error 1
make[3]: *** Waiting for unfinished jobs
rm fsf-funding.pod gcov.pod gfdl.pod cpp.pod gpl.pod gcc.pod gcov-dump.pod
gcov-tool.pod
make[3]: Leaving directory `/usr/local/gcc/test/Build/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/usr/local/gcc/test/Build'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/usr/local/gcc/test/Build'
make: *** [all] Error 2

Program received signal SIGSEGV, Segmentation fault.
0x42c64ca0 in emit_insn_group_barriers (dump=0x0)
at ../../gcc/config/ia64/ia64.c:7106
7106  if (BB_HEAD (BLOCK_FOR_INSN (last_label)) ==
last_label)
(gdb) p last_label
$1 = (rtx_insn *) 0x26155440
(gdb) pr
warning: Expression is not an assignment (and might have no effect)
(code_label 425 4296 426 1431 (nil) [3 uses])

[Bug target/83405] [8 Regression] bootstrap fails building a hppa64 compiler using gcc-8 trunk

2017-12-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83405

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||jakub at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #2 from Jakub Jelinek  ---
The patch for that is https://gcc.gnu.org/ml/gcc-patches/2017-12/msg00794.html

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

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

Jakub Jelinek  changed:

   What|Removed |Added

 CC||doko at gcc dot gnu.org

--- Comment #40 from Jakub Jelinek  ---
*** Bug 83405 has been marked as a duplicate of this bug. ***

[Bug c++/83406] [8 Regression] GCC8 can't deduce lambda return type

2017-12-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83406

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P1
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Started with r251430.

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #41 from Andreas Schwab  ---
/usr/local/gcc/test/Build/./prev-gcc/xg++
-B/usr/local/gcc/test/Build/./prev-gcc/ -B/usr/ia64-suse-linux/bin/ -nostdinc++
-B/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/src/.libs
-B/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/libsupc++/.libs 
-I/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/include/ia64-suse-linux
 -I/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/include 
-I/usr/local/gcc/test/libstdc++-v3/libsupc++
-L/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/src/.libs
-L/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/libsupc++/.libs
-fno-PIE -c  -DUSE_LIBUNWIND_EXCEPTIONS  -g -O2 -DIN_GCC -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common
-Wno-error -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/.
-I../../gcc/../include -I../../gcc/../libcpp/include 
-I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber
-I../../gcc/../libbacktrace   -o insn-attrtab.o -MT insn-attrtab.o -MMD -MP -MF
./.deps/insn-attrtab.TPo insn-attrtab.c
during RTL pass: mach
../../gcc/config/ia64/itanium2.md: In function ‘attr_type
get_attr_type(rtx_insn*)’:
../../gcc/config/ia64/itanium2.md:4336:1: internal compiler error: in
try_ready, at haifa-sched.c:7524
0x4018d53f ???
../sysdeps/ia64/elf/start.S:106
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
make[3]: *** [insn-attrtab.o] Error 1
make[3]: *** Waiting for unfinished jobs
make[3]: Leaving directory `/usr/local/gcc/test/Build/gcc'
make[2]: *** [all-stage3-gcc] Error 2
make[2]: Leaving directory `/usr/local/gcc/test/Build'
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory `/usr/local/gcc/test/Build'
make: *** [all] Error 2

(gdb) bt
#0  0x401843a0 in fancy_abort(char const*, int, char const*) ()
#1  0x42557890 in try_ready(rtx_insn*) ()
#2  0x426cd6c0 in init_ready_list ()
#3  0x42560f80 in schedule_block(basic_block_def**, void*) ()
#4  0x426ce690 in schedule_ebb(rtx_insn*, rtx_insn*, bool) ()
#5  0x426cfa10 in schedule_ebbs() ()
#6  0x41f16a60 in ia64_reorg() ()
#7  0x4150add0 in (anonymous
namespace)::pass_machine_reorg::execute(function*) ()
#8  0x413e9c90 in execute_one_pass(opt_pass*) ()
#9  0x413eb380 in execute_pass_list_1(opt_pass*) ()
#10 0x413eb410 in execute_pass_list_1(opt_pass*) ()
#11 0x413eb410 in execute_pass_list_1(opt_pass*) ()
#12 0x413eb4f0 in execute_pass_list(function*, opt_pass*) ()
#13 0x40b52aa0 in cgraph_node::expand() ()
#14 0x40b569e0 in symbol_table::compile() [clone .part.70] ()
#15 0x40b5da80 in symbol_table::finalize_compilation_unit() ()
#16 0x41631030 in compile_file() ()
#17 0x40188610 in toplev::main(int, char**) ()
#18 0x4018d190 in main ()

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #43 from joseph at codesourcery dot com  ---
The build-many-glibcs.py builds with mainline tools start 24 hours after 
the previous such build finished (so the next one will start at 21:44 UTC 
today; if all the build problems are fixed, it would be about 7 hours from 
then for both the "compilers" and the "glibcs" builds to complete).

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #45 from Andreas Schwab  ---
Starting program: /usr/local/gcc/test/Build/prev-gcc/cc1plus -quiet -nostdinc++
-I
/usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/include/ia64-suse-linux
-I /usr/local/gcc/test/Build/prev-ia64-suse-linux/libstdc++-v3/include -I
/usr/local/gcc/test/libstdc++-v3/libsupc++ -I . -I c-family -I ../../gcc -I
../../gcc/c-family -I ../../gcc/../include -I ../../gcc/../libcpp/include -I
../../gcc/../libdecnumber -I ../../gcc/../libdecnumber/dpd -I ../libdecnumber
-I ../../gcc/../libbacktrace -iprefix
/usr/local/gcc/test/Build/prev-gcc/../lib/gcc/ia64-suse-linux/8.0.0/ -isystem
/usr/local/gcc/test/Build/./prev-gcc/include -isystem
/usr/local/gcc/test/Build/./prev-gcc/include-fixed -MMD c-family/c-warn.d -MF
c-family/.deps/c-warn.TPo -MP -MT c-family/c-warn.o -D_GNU_SOURCE -D
USE_LIBUNWIND_EXCEPTIONS -D IN_GCC_FRONTEND -D IN_GCC_FRONTEND -D IN_GCC -D
HAVE_CONFIG_H ../../gcc/c-family/c-warn.c -quiet -dumpbase c-warn.c
-auxbase-strip c-family/c-warn.o -g -O2 -Wextra -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wsuggest-attribute=format -Woverloaded-virtual
-Wpedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror
-fno-PIE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -fno-common
Failed to read a valid object file image from memory.

Breakpoint 1, fancy_abort (file=0x43d15300 "../../gcc/haifa-sched.c", 
line=7524, 
function=0x43d16568 
"try_ready") at ../../gcc/diagnostic.c:1500
1500  internal_error ("in %s, at %s:%d", function, trim_filename (file),
line);
(gdb) up
#1  0x43643690 in try_ready (next=0x2582f100)
at ../../gcc/haifa-sched.c:7520
7520  gcc_assert (!(old_ts & ~(SPECULATIVE | HARD_DEP | DEP_CONTROL |
DEP_POSTPONED))
(gdb) p next
$2 = (rtx_insn *) 0x2582f100
(gdb) pr
warning: Expression is not an assignment (and might have no effect)
(debug_insn 1847 1400 1837 (debug_marker) "../../gcc/c-family/c-warn.c":594 -1
 (nil))

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #46 from Jakub Jelinek  ---
(In reply to Andreas Schwab from comment #44)
> Breakpoint 1, fancy_abort (file=0x43d15300
> "../../gcc/haifa-sched.c", 
> line=5465, 
> function=0x43d164b8  rtx_def*)::__FUNCTION__> "move_insn") at ../../gcc/diagnostic.c:1500
> 1500  internal_error ("in %s, at %s:%d", function, trim_filename (file),
> line);
> (gdb) up
> #1  0x43632010 in move_insn (insn=0x2d6340f8, 
> last=0x2d6d4040, nt=0x2d887ec0)
> at ../../gcc/haifa-sched.c:5465
> 5465  gcc_assert (NOTE_INSN_BASIC_BLOCK_P (note));
> (gdb) p note
> $1 = (rtx_insn *) 0x2d772700
> (gdb) pr
> warning: Expression is not an assignment (and might have no effect)
> (debug_insn 5101 1610 8844 (debug_marker) "../../gcc/c/c-typeck.c":4700 -1
>  (nil))

Ugh.  In that case it might be conceptually better if the group barriers were
actually notes, on the other side we don't have support for target dependent
notes.
In that case, I guess we need to punt on all the checking.  Let me tweak the
#c30 patch :(.

[Bug c++/83322] [8 Regression] r255469 causes: ICE: tree check: expected class ‘type’, have ‘exceptional’ (baselink) in diag_attr_exclusions, at attribs.c:393

2017-12-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83322

Martin Sebor  changed:

   What|Removed |Added

   Keywords||patch
 Status|NEW |ASSIGNED
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=83394
   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org

--- Comment #5 from Martin Sebor  ---
The patch I posted for bug 83394 also fixes the ICE reported in comment #0:
https://gcc.gnu.org/ml/gcc-patches/2017-12/msg00785.html

I'm testing an updated patch that also takes case of the ICE in comment #4.

[Bug middle-end/83404] bogus stringop-overflow warning

2017-12-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83404

Martin Sebor  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=83412

--- Comment #3 from Martin Sebor  ---
It should and does as long as the result is used (see below) and as long as
some GCC bug doesn't get in the way.  When  defines strncat as macro
like in Glibc 2.24 the warning doesn't trigger.  I opened bug 83412 for it. 
There's also bug 82944 that I thought was due to warnings being suppressed for
macros defined in system headers but maybe it's actually the same as bug 83412.
 Phew.

$ cat a.c && gcc -O2 -S -Wall a.c
extern char* strncpy (char*, const char*, __SIZE_TYPE__);
extern char* strncat (char*, const char*, __SIZE_TYPE__);

int main (void)
{
  char x[12];

  strncpy (x, "", 12);

  strncat (x, "aa", 1);

  __builtin_puts (x);
}
a.c: In function ‘main’:
a.c:10:3: warning: ‘strncat’ output truncated copying 1 byte from a string of
length 2 [-Wstringop-truncation]
   strncat (x, "aa", 1);
   ^~~~

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #34 from Jakub Jelinek  ---
Ok, reduced testcase for the -fcompare-debug (length) issue is just:
void fn1() {}
with -O2 -gdwarf-4 -fcompare-debug
The *.ira dump is still identical, but reload has:
--- pr83396.ii.276r.reload  2017-12-13 16:31:30.077467285 +0100
+++ pr83396.ii.gk.276r.reload   2017-12-13 16:31:30.144466454 +0100
@@ -6,10 +6,10 @@

   Spilling non-eliminable hard regs: 1
 New elimination table:
-Can eliminate 31 to 1 (offset=0, prev_offset=0)
-Can eliminate 111 to 1 (offset=0, prev_offset=0)
+Can eliminate 31 to 1 (offset=-32, prev_offset=0)
+Can eliminate 111 to 1 (offset=-32, prev_offset=0)
 Can eliminate 111 to 31 (offset=0, prev_offset=0)
-Can eliminate 67 to 1 (offset=32, prev_offset=0)
+Can eliminate 67 to 1 (offset=0, prev_offset=0)
 Can eliminate 67 to 31 (offset=32, prev_offset=0)
 Can eliminate 30 to 30 (offset=0, prev_offset=0)
   Spilling non-eliminable hard regs: 1
@@ -36,10 +36,10 @@ EBB 2
   Spilling non-eliminable hard regs: 1
   Spilling non-eliminable hard regs: 1
 New elimination table:
-Can eliminate 31 to 1 (offset=0, prev_offset=0)
-Can eliminate 111 to 1 (offset=0, prev_offset=0)
+Can eliminate 31 to 1 (offset=-32, prev_offset=-32)
+Can eliminate 111 to 1 (offset=-32, prev_offset=-32)
 Can eliminate 111 to 31 (offset=0, prev_offset=0)
-Can eliminate 67 to 1 (offset=32, prev_offset=32)
+Can eliminate 67 to 1 (offset=0, prev_offset=0)
 Can eliminate 67 to 31 (offset=32, prev_offset=0)
 Can eliminate 30 to 30 (offset=0, prev_offset=0)
differences.

The bug is obvious, rs6000_stack_info has:
  else if (TARGET_XCOFF && write_symbols != NO_DEBUG)
info->push_p = 1;
so it generates different code based on whether -g is enabled or not.
Clearly that is a preexisting bug.  If it is for whatever reason needed, can't
it be done regardless of -g, i.e.
  else if (TARGET_XCOFF)
info->push_p = 1;
or, if you are ok with -fcompare-debug being broken for the default stabs or
whatever AIX uses for debugging (which implies different code generation
between -g and -g0), at least do it like:
  else if (TARGET_XCOFF && write_symbols != NO_DEBUG && write_symbols !=
DWARF2_DEBUG)
info->push_p = 1;

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #35 from Jakub Jelinek  ---
Discussed in the https://gcc.gnu.org/ml/gcc-patches/2003-03/msg01693.html
thread.
Thus, David, can you check if AIX debugging even without push_p?  Perhaps
separately -gdwarf-{2,3,4} and the default debugging?

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread dje at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #37 from David Edelsohn  ---
Jakub, the -fcompare-debug failure is not new.  The root cause has been
analyzed before. AIX specifically does not want to push unnecessary stack
frames for code that is not compiled with debugging solely for matching code
generation.

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #39 from Jakub Jelinek  ---
(In reply to David Edelsohn from comment #37)
> Jakub, the -fcompare-debug failure is not new.  The root cause has been
> analyzed before. AIX specifically does not want to push unnecessary stack
> frames for code that is not compiled with debugging solely for matching code
> generation.

The question is, is it really needed for proper debugging even after 12 years
since it has been checked last (and even in that case it doesn't look like it
has been verified it doesn't work)?  And, if it is needed for XCOFF_DEBUG, is
it also needed for DWARF2_DEBUG?  I mean, at least the dwarf case in theory
should have all means to represent automatic variables in the frame regardless
of it, and gdb must handle it too.  What other debuggers you use on aix for
-gdwarf-* debugging?

[Bug target/83408] microblaze: long compile times

2017-12-13 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83408

--- Comment #2 from Arnd Bergmann  ---
I've tried removing the architecture specific bits from the preprocessed file.
The issue is still unchanged on microblaze but I could not trigger it on x86,
the same file builds fine here.

[Bug middle-end/82365] stack locations are consolidated if noreturn function is on the path

2017-12-13 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82365

--- Comment #10 from Arnd Bergmann  ---
I have now observed the problem in another file, this one time that is more
commonly used, but not as drastic, as the stack usage is only around 1000
bytes.

The original source code is in
https://elixir.free-electrons.com/linux/v4.14/source/include/net/ip_vs.h#L1243
This reduces to

int a, b, c, d, e;
inline char *ip_vs_dbg_addr(char *p1, int *p2) {
  __builtin_snprintf([*p2], a, "[%pI6c]", );
  if ((a)) {
__builtin_trap();
}
  return [1];
}
void ip_vs_control_add() {
  do {
char f[160];
ip_vs_dbg_addr(f, );
  } while (0);
  {
int g = d;
char h[160];
ip_vs_dbg_addr(h, );
{
  char i[160];
  ip_vs_dbg_addr(i, );
}
{
  char j[160];
  ip_vs_dbg_addr(j, );
}
  }
  char k[160];
  ip_vs_dbg_addr(k, );
}

which uses 800 bytes of stack space. Adding an 'asm volatile("");' statement
before __builtin_trap() again solves the problem.

[Bug rtl-optimization/82398] [8 Regression] error: qsort comparator non-negative on sorted output: 2 in fill_vec_av_set at gcc/sel-sched.c:3725

2017-12-13 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82398

Alexander Monakov  changed:

   What|Removed |Added

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

--- Comment #7 from Alexander Monakov  ---
Yes, fixed.  I prefer to close this bug (I guess we don't want to adjust
SCHED_GROUP_P handling in stage3).

[Bug middle-end/82407] [meta-bug] qsort_chk fallout tracking

2017-12-13 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82407
Bug 82407 depends on bug 82398, which changed state.

Bug 82398 Summary: [8 Regression] error: qsort comparator non-negative on 
sorted output: 2 in fill_vec_av_set at gcc/sel-sched.c:3725
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82398

   What|Removed |Added

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

[Bug c/83407] Warn about unsigned size_t underflow

2017-12-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83407

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #4 from Andrew Pinski  ---
.

[Bug libstdc++/59568] complex type operator>> does not set eofbit for input streams.

2017-12-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59568

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #8 from Jonathan Wakely  ---
Fixed for GCC 8.

[Bug tree-optimization/83412] New: GCC line directive suppresses warnings

2017-12-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83412

Bug ID: 83412
   Summary: GCC line directive suppresses warnings
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

For some reason the GCC # line directive suppresses warnings.  See bug 83404,
comment 2 for the origin of this bug report.

$ cat a.c && gcc -O2 -S -Wall a.c
#include 

char x[12];

void f (void)
{
  __builtin_strncat (x, "aa", 1);   // warning (good)
}

void g (void)
{
  strncat (x, "aa", 1);   // no warning (bug)
}

a.c: In function ‘f’:
a.c:7:3: warning: ‘__builtin_strncat’ output truncated copying 1 byte from a
string of length 2 [-Wstringop-truncation]
   __builtin_strncat (x, "aa", 1);   // warning (good)
   ^~


The problem can be reproduced with another, simpler test case:

$ cat a.ii && gcc -O2 -S -Wall a.ii
char x[12];

void f (void)
{
  x[13] = 0;   // -Warray-bounds (good)
}

int g (void)
{
# 12 "a.c" 3 4
  return x[13];   // no warning (bug)
}
a.ii: In function ‘void f()’:
a.ii:5:7: warning: array subscript 13 is above array bounds of ‘char [12]’
[-Warray-bounds]
   x[13] = 0;   // -Warray-bounds (good)
   ^

[Bug bootstrap/83396] [8 Regression] Bootstrap failures with Statement Frontiers

2017-12-13 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83396

--- Comment #44 from Andreas Schwab  ---

Breakpoint 1, fancy_abort (file=0x43d15300 "../../gcc/haifa-sched.c", 
line=5465, 
function=0x43d164b8  "move_insn") at ../../gcc/diagnostic.c:1500
1500  internal_error ("in %s, at %s:%d", function, trim_filename (file),
line);
(gdb) up
#1  0x43632010 in move_insn (insn=0x2d6340f8, 
last=0x2d6d4040, nt=0x2d887ec0)
at ../../gcc/haifa-sched.c:5465
5465  gcc_assert (NOTE_INSN_BASIC_BLOCK_P (note));
(gdb) p note
$1 = (rtx_insn *) 0x2d772700
(gdb) pr
warning: Expression is not an assignment (and might have no effect)
(debug_insn 5101 1610 8844 (debug_marker) "../../gcc/c/c-typeck.c":4700 -1
 (nil))

[Bug target/81874] internal compiler error: in do_SUBST, at combine.c:725

2017-12-13 Thread zwzhangwen.zhang at huawei dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81874

--- Comment #6 from zwzhangwen.zhang at huawei dot com ---
I think this bug exists and hides.The reason is that trunc_int_for_mode will
check newval replacing oldval with CONST_INT in combine pass, but for
0x8000,the result of  trunc_int_for_mode is 0xfff8000 and is not
equal to 0x8000. So gcc assert as follows:
  /* Sanity check that we're replacing oldval with a CONST_INT
 that is a valid sign-extension for the original mode.  */
  gcc_assert (INTVAL (newval)
  == trunc_int_for_mode (INTVAL (newval), GET_MODE (oldval)));
gcc tries to combine two insns as follows:
(insn 4018 4017 4019 226 (set (reg:SI 2681)
(const_int -2147483648 [0x8000])) ...
  (expr_list:REG_EQUAL (const_int 2147483648 [0x8000])
 (nil))
(insn 4019 4018 12 226 (set (mem:SI (reg/f:SI 270 [ pretmp_609 ]) [1
*pretmp_609+0 S4 A32])
(reg:SI 2681)) ...
 (nil))
The first time gcc try to combine them but fail. The second time gcc find equal
reg_note and continue to combine them then gcc assert.
Because many optimizing pass can affect insn list, many patch can hide the bug.
Hope your help to resolve the problem.

[Bug c/83390] valgrind error in lra_eliminate_regs_1

2017-12-13 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83390

--- Comment #6 from David Binderman  ---
(In reply to David Binderman from comment #5)
> I'll dig deeper with some more debug statements.

I couldn't make much sense of the results, so I tried initialising
local variable "offset" at it's declaration to zero.

That didn't fix the problem. I still get valgrind errors.

To make more sense of the results, for valgrind does 
defined -= undefined produce undefined ?

If so, the debug results indicate that this statement is
the one where it goes wrong:

   offset -= lra_get_insn_recog_data (insn)->sp_offset;

which seems to indicate that function lra_get_insn_recog_data is going wrong.

[Bug debug/83419] New: [8 Regression] -fcompare-debug failure (length)

2017-12-13 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83419

Bug ID: 83419
   Summary: [8 Regression] -fcompare-debug failure (length)
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
CC: aoliva at gcc dot gnu.org
  Target Milestone: ---

trippels@gcc67 ffmpeg % cat utils.i
int a, b;
void fn1();
void fn2() {
  if (a || 1 == b)
fn1();
  else
0;
  fn1(1, 0);
}

trippels@gcc67 ffmpeg % gcc -fcompare-debug -O2 -c utils.i --save-temps
gcc: error: utils.i: -fcompare-debug failure (length)

trippels@gcc67 ffmpeg % diff -u utils.gkd utils.gk.gkd
--- utils.gkd   2017-12-14 08:40:37.017897604 +0100
+++ utils.gk.gkd2017-12-14 08:40:37.037897592 +0100
@@ -112,7 +112,7 @@
 (expr_list (use (reg:QI 0 ax))
 (nil)))
 (jump_insn # 0 0 5 (set (pc)
-(label_ref #))# {jump}
+(label_ref #)) "utils.i":5# {jump}
  (nil)
  -> 3)
 (barrier # 0 0)

[Bug c++/83394] [8 Regression] always_inline vs. noinline no longer diagnosed

2017-12-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83394

Martin Sebor  changed:

   What|Removed |Added

   Keywords||patch

--- Comment #5 from Martin Sebor  ---
Patch for this bug as well as for pr83322:
https://gcc.gnu.org/ml/gcc-patches/2017-12/msg00785.html

[Bug tree-optimization/83412] GCC line directive suppresses warnings

2017-12-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83412

--- Comment #2 from Andrew Pinski  ---
# 12 "a.c" 3 4

This means you are in a system header so -Wsystem is needed IIRC.

[Bug c++/79650] [6/7/8 Regression] ICE on invalid c++ code with label arithmetic in convert_nontype_argument (pt.c:6515)

2017-12-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79650

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek  ---
Another testcase that ICEs:
template<__INTPTR_TYPE__> struct A {};

void
foo ()
{
  static int a, b;
  A<4 + (__INTPTR_TYPE__)> c;
}

In the end, the question is what is a constant expression.  Expressions like
4 + (__INTPTR_TYPE__)
or
(__INTPTR_TYPE__)& - (__INTPTR_TYPE__)&
are valid assembly time constants, which means we can safely put them into say
.rodata variable initializers.  Which is why initializer_constant_valid_p
returns non-NULL for them, and that is what reduced_constant_expression_p
calls.

On the other side, I bet at least for template integral parameters that isn't
what we care about, we really need something that folds into an integer.

[Bug fortran/83076] [8 Regression] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1598

2017-12-13 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83076

--- Comment #10 from Dominique d'Humieres  ---
> "Today" got rather extended!

;-)

> I have fixed the problem with pr58793. You had better provide me with
> one or two other examples.

For

internal compiler error: in gfc_add_modify_loc, at fortran/trans.c:159

pr60255, pr61337, pr64589, pr64692, pr64787, pr67562, and pr69604.

For

internal compiler error: in fold_convert_loc, at fold-const.c:2368

pr28425, pr39879, pr40440, pr40796, pr40850, pr41936, pr44912, pr45077,
pr51869, pr51972, pr59654, pr59678, pr61819, pr61830, pr78293, pr79053,
pr79344, pr79440, and pr81903.

[Bug c++/79650] [6/7/8 Regression] ICE on invalid c++ code with label arithmetic in convert_nontype_argument (pt.c:6515)

2017-12-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79650

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #6 from Jakub Jelinek  ---
Created attachment 42874
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42874=edit
gcc8-pr79650.patch

Untested fix.

[Bug other/83413] New: that's a compiler bug, not something we can address. MAME is known to be buildable for other ARM targets (e.g. Raspberry Pi) right now so it appears to be an issue with whatever

2017-12-13 Thread perfeitoan at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83413

Bug ID: 83413
   Summary: that's a compiler bug, not something we can address.
MAME is known to be buildable for other ARM targets
(e.g. Raspberry Pi) right now so it appears to be an
issue with whatever you're building for.
   Product: gcc
   Version: 7.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: perfeitoan at hotmail dot com
  Target Milestone: ---

Compiling src/mame/video/bfm_adr2.cpp...
Linking chdman...
/usr/bin/ld: ../../../../../scripts/src/libutils.a(strformat.o): relocation
R_ARM_MOVW_ABS_NC against `_ZNKSt5ctypeIcE8do_widenEc' can not be used when
making a shared object; recompile with -fPIC
../../../../../scripts/src/libutils.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [chdman.make:250: ../../../../../chdman] Error 1
make[1]: *** [Makefile:1036: chdman] Error 2
make[1]: *** Waiting for unfinished jobs
Compiling src/mame/video/bfm_dm01.cpp...
Compiling src/lib/formats/pasti_dsk.cpp...
Compiling src/lib/formats/ti99_dsk.cpp...
Compiling src/lib/formats/tzx_cas.cpp...
Compiling src/lib/formats/upd765_dsk.cpp...
Compiling src/lib/formats/vdk_dsk.cpp...
Compiling src/lib/formats/victor9k_dsk.cpp...
Compiling src/lib/formats/wd177x_dsk.cpp...
Archiving libformats.a...
Archiving libbfm.a...
Archiving libbarcrest.a...
make: *** [makefile:1254: linux] Error 2
[aperfeito@alarm mame]$


SYSTEM:

Linux alarm 3.10.18-24-ARCH #1 SMP Wed Nov 29 16:27:21 PST 2017 armv7l
GNU/Linux

COMMAND:
make TARGET=mame REGENIE=1 TOOLS=1 SUBTARGET=mame -j5

GCC:

[aperfeito@alarm mame]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/7.2.1/lto-wrapper
Target: armv7l-unknown-linux-gnueabihf
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=https://github.com/archlinuxarm/PKGBUILDs/issues
--enable-languages=c,c++,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id
--enable-lto --enable-plugin --enable-install-libiberty
--with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib
--disable-werror --enable-checking=release --enable-default-pie
--enable-default-ssp --host=armv7l-unknown-linux-gnueabihf
--build=armv7l-unknown-linux-gnueabihf --with-arch=armv7-a --with-float=hard
--with-fpu=vfpv3-d16
Thread model: posix
gcc version 7.2.1 20171128 (GCC)

  1   2   >