[Bug go/83308] Missing platform definitions for SH in libgo

2017-12-07 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83308

--- Comment #3 from Oleg Endo  ---
Go will not work on SH just by adding it to the list of targets.  For instance
split stacks support is not implemented on SH.

[Bug c++/83300] Segmentation fault with template and __attribute__((vector_size (sizeof(int) * N)));

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

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #5 from Jakub Jelinek  ---
So, the problem is that on that testcase *decl_p is UNDERLYING_TYPE, and
build_type_attribute_variant (but cp_build_type_attribute_variant too, as it
calls it) calls layout_type on it and that ICEs, because it is a FE specific
type which it doesn't know what to do.
So, I bet we could use build_type_attribute_variant only if (!dependent_type_p
(*decl_p)).  The question is what to do with the dependent types, can we modify
them in place always, or shall we create build_variant_type_copy, or do we need
to do some hashing like e.g. build_cplus_array_type does?

This passes both tests, but I'm afraid our testsuite coverage of dependent
types with late attributes on them is very limited.

2017-12-07  Jakub Jelinek  

PR c++/83300
* decl2.c (save_template_attributes): Add flags argument, if
not ATTR_FLAG_TYPE_IN_PLACE, *decl_p is a type and we want to
modify TYPE_ATTRIBUTES, add them on type attribute variant.

* g++.dg/ext/vector33.C: New test.

--- gcc/cp/decl2.c.jj   2017-12-06 23:48:08.205147975 +0100
+++ gcc/cp/decl2.c  2017-12-07 09:39:18.539996630 +0100
@@ -1244,7 +1244,7 @@ splice_template_attributes (tree *attr_p
DECL_P.  */

 static void
-save_template_attributes (tree *attr_p, tree *decl_p)
+save_template_attributes (tree *attr_p, tree *decl_p, int flags)
 {
   tree *q;

@@ -1265,7 +1265,20 @@ save_template_attributes (tree *attr_p,
   /* Merge the late attributes at the beginning with the attribute
  list.  */
   late_attrs = merge_attributes (late_attrs, *q);
-  *q = late_attrs;
+  if (*q != late_attrs
+  && !DECL_P (*decl_p)
+  && !(flags & ATTR_FLAG_TYPE_IN_PLACE))
+{
+  if (!dependent_type_p (*decl_p))
+   *decl_p = cp_build_type_attribute_variant (*decl_p, late_attrs);
+  else
+   {
+ *decl_p = build_variant_type_copy (*decl_p);
+ TYPE_ATTRIBUTES (*decl_p) = late_attrs;
+   }
+}
+  else
+*q = late_attrs;

   if (!DECL_P (*decl_p) && *decl_p == TYPE_MAIN_VARIANT (*decl_p))
 {
@@ -1466,7 +1479,7 @@ cplus_decl_attributes (tree *decl, tree
   if (check_for_bare_parameter_packs (attributes))
return;

-  save_template_attributes (&attributes, decl);
+  save_template_attributes (&attributes, decl, flags);
 }

   cp_check_const_attributes (attributes);
--- gcc/testsuite/g++.dg/ext/vector33.C.jj  2017-12-07 09:10:24.227635836
+0100
+++ gcc/testsuite/g++.dg/ext/vector33.C 2017-12-07 09:10:24.227635836 +0100
@@ -0,0 +1,10 @@
+// PR c++/83300
+// { dg-do compile { target c++11 } }
+
+template
+using T = int __attribute__((vector_size (sizeof(int) * N)));
+
+void
+f (T<4>)
+{
+}

[Bug ada/83310] Compiler crash

2017-12-07 Thread porton at narod dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83310

--- Comment #2 from Victor Porton  ---
Created attachment 42807
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42807&action=edit
project file

note that sources should be put into src/ subfolder

[Bug ada/83310] Compiler crash

2017-12-07 Thread porton at narod dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83310

--- Comment #1 from Victor Porton  ---
Created attachment 42806
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42806&action=edit
forgotten Makefile

[Bug c++/83301] [6 Regression] cgraph.c segfault

2017-12-07 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83301

Thomas Schwinge  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-12-07
 CC||tschwinge at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Thomas Schwinge  ---
With C-Reduce, I have reduced the 6.5 MiB preprocessed C++ file to 6.5 KiB --
which is still 326 lines.  We'll see about publishing that one.

I'm confirming that the ICE seen here and as reported in PR78692 for GCC 7 does
get resolved when cherry-picking r243377 to GCC 6 (but the
g++.dg/torture/pr78692.C test case of r243377 does not actually fail on GCC 6
without the code changes...).

However, in my "--enable-checking=yes,df,fold,rtl" build I'll then run into a
different ICE with the original 6.5 MiB file...  :-/ So there is more work to
be done here.  I'll now re-C-Reduce for that ICE, and try to find out whether
that's a known/already fixed issue or something new.

[Bug c++/83309] Structure elements have O(n^2) compile time slowdown

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||nathan at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
The time is spent in fields_linear_search before we build the sorted vector for
binary search.
#0  0x0093d57c in fields_linear_search (klass=, name=, 
want_type=false) at ../../gcc/cp/name-lookup.c:1165
#1  0x0093dfd4 in get_class_binding_direct (klass=, name=, 
type_or_fns=0) at ../../gcc/cp/name-lookup.c:1270
#2  0x0093e524 in get_class_binding (klass=, name=, 
type_or_fns=0) at ../../gcc/cp/name-lookup.c:1324
#3  0x00a497b1 in lookup_field_r (binfo=,
data=0x7fffd4a0) at ../../gcc/cp/search.c:977
#4  0x00a4ac12 in dfs_walk_all (binfo=,
pre_fn=0xa49649 , post_fn=0x0, 
data=0x7fffd4a0) at ../../gcc/cp/search.c:1410
#5  0x00a4a00b in lookup_member (xbasetype=,
name=, protect=2, want_type=false, 
complain=3, afi=0x0) at ../../gcc/cp/search.c:1134
#6  0x0094a586 in get_class_binding (name=, scope=0x7fffefad8210)
at ../../gcc/cp/name-lookup.c:4519
#7  0x0094acdb in push_class_level_binding_1 (name=, x=)
at ../../gcc/cp/name-lookup.c:4645
#8  0x0094b1e8 in push_class_level_binding (name=, x=)
at ../../gcc/cp/name-lookup.c:4751
#9  0x0094a2bb in pushdecl_class_level (x=) at ../../gcc/cp/name-lookup.c:4476
#10 0x00a59308 in finish_member_declaration (decl=) at ../../gcc/cp/semantics.c:3044

Perhaps if fields_linear_search notices more fields than some constant/param,
we could build a sorted vector from what we have so far and do the linear
search only on the remaining fields and use the partial vector for binary
search on the rest?  If the linear search on the reminder grows again, sort the
remainder and merge the two sorted lists.

[Bug c++/83301] [6 Regression] cgraph.c segfault

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

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |6.5

--- Comment #3 from Richard Biener  ---
Cherry-picking r243377 is ok.  Does that fix things with release checking?

[Bug c++/83301] [6 Regression] cgraph.c segfault

2017-12-07 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83301

--- Comment #4 from Thomas Schwinge  ---
(In reply to Thomas Schwinge from comment #2)
> However, in my "--enable-checking=yes,df,fold,rtl" build I'll then run into
> a different ICE with the original 6.5 MiB file...  :-/ So there is more work
> to be done here.  I'll now re-C-Reduce for that ICE, and try to find out
> whether that's a known/already fixed issue or something new.

That other ICE seems to be PR79732, already fixed in gcc-6-branch r246188.

(I had noticed just earlier today that my GCC 6 build that I run the C-Reduce
on was not exactly up-to-date.  I'm now in the process of updating it.)

[Bug c++/83301] [6 Regression] cgraph.c segfault

2017-12-07 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83301

Thomas Schwinge  changed:

   What|Removed |Added

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

--- Comment #5 from Thomas Schwinge  ---
(In reply to Richard Biener from comment #3)
> Cherry-picking r243377 is ok.  Does that fix things with release checking?

Thanks, and yes.  I'll do the commit after finishing testing.

[Bug rtl-optimization/83304] [8 Regression] FAIL: gcc.c-torture/execute/pr61725.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions

2017-12-07 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83304

--- Comment #8 from ktkachov at gcc dot gnu.org ---
Created attachment 42808
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42808&action=edit
Assembly for aborting testcase

Attaching the assembly for -O2 -funroll-loops -mthumb  -march=armv8-a
-mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard that aborts

[Bug target/43871] -mcpu=power4 -mtune=cell emits power7/cell-only opcodes

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

--- Comment #7 from Segher Boessenkool  ---
Author: segher
Date: Thu Dec  7 09:36:28 2017
New Revision: 255464

URL: https://gcc.gnu.org/viewcvs?rev=255464&root=gcc&view=rev
Log:
rs6000: Initialise rs6000_cpu correctly (PR43871)

Finally, set rs6000_cpu based not on -mtune=, but only -mcpu= and the
defaults.


PR target/43871
* config/rs6000/rs6000.c (rs6000_option_override_internal): Set
rs6000_cpu to the given -mcpu=, or to the default processor.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.c

[Bug tree-optimization/83311] Unable to optimize alloc calls with casts and string builtins

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

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-12-07
Version|unknown |8.0
 Depends on||82991
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
While I could special-case this it really depends on PR82991.  The issue is we
see

   :
  s_5 = __builtin_alloca (1);
  _1 = __builtin_memcpy (s_5, "a", 1);
  _2 = MEM[(char *)_1];
  _7 = (int) _2;
  return _7;

thus we read from _1 but we memcpy to s_5.  One might consider it a duplicate
of that PR even.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82991
[Bug 82991] memcpy and strcpy return value can be assumed to be equal to first
argument

[Bug libstdc++/83306] filesystem_error is not nothrow copyable

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

Jonathan Wakely  changed:

   What|Removed |Added

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

[Bug tree-optimization/83296] missing -Wstringop-overflow due to missing range info for MAX_EXPR

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

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #2 from Richard Biener  ---
Happens because:

  /* Create an SSA var to hold the min/max result.  If we're the only
 things setting the target PHI, then we  can clone the PHI
 variable.  Otherwise we must create a new one.  */
  result = PHI_RESULT (phi);
  if (EDGE_COUNT (gimple_bb (phi)->preds) == 2)
result = duplicate_ssa_name (result, NULL);
  else
result = make_ssa_name (TREE_TYPE (result));

  /* Emit the statement to compute min/max.  */
  new_stmt = gimple_build_assign (result, minmax, arg0, arg1);
  gsi = gsi_last_bb (cond_bb);
  gsi_insert_before (&gsi, new_stmt, GSI_NEW_STMT);

  replace_phi_edge_with_variable (cond_bb, e1, phi, result);

ok until here but then:

  reset_flow_sensitive_info_in_bb (cond_bb);

added by r228341.  I don't see immediately why we need that - it resets
flow-sensitive info in the BB of the conditional not in a block only
dominated by the true/false edge.

I have a patch.

[Bug c++/83309] Structure elements have O(n^2) compile time slowdown

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

--- Comment #2 from Richard Biener  ---
callgrind says all time is spent in lookup_field_1.  I suppose
CLASSTYPE_SORTED_FIELDS isn't set during parsing the structure and we likely
look for duplicates here.

Nathan rewrote name-lookup for GCC 8 which still sees this slowness via
fields_linear_search (that name suggests what goes wrong here already).

Confirmed.

Note we also seem to do two lookups per field, one for the type and one for
the value binding...

[Bug target/83297] Internal Compiler Error

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

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #2 from Richard Biener  ---
GCC 4.9 is no longer maintained, please report to your distribution instead.

[Bug target/83302] i386 stack_probe has side effects

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

Richard Biener  changed:

   What|Removed |Added

   Keywords||wrong-code
 Target|x86_64--netbsd  |x86_64-*-*, i?86-*-*
 CC||law at gcc dot gnu.org,
   ||matz at gcc dot gnu.org,
   ||rguenth at gcc dot gnu.org

--- Comment #1 from Richard Biener  ---
The stack should be private to a thread so I am missing what can go wrong here
...?  I think that a write to a not mapped page will never be "atomic"?

[Bug target/81906] [7/8 Regression] Calls to rint() wrongly optimized away starting in g++ 6

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

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #13 from Jakub Jelinek  ---
Created attachment 42809
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42809&action=edit
gcc8-pr81906.patch

The above in patch form.  Note that:
  xa = fabs (operand1);
  a2_52 = 2**52;
  [if flag_rounding_math]
a2_52 = copysign (a2_52, operand1);
  xa = xa + a2_52 - a2_52;
  return copysign (xa, operand1);
is incorrect for negative operand1, because if we use negative a2_52, then we
need to use xa = operand1 + a2_52 - a2_52; rather than xa = xa + a2_52 - a2_52;
otherwise say rint (-2.5) is -2.5.

[Bug rtl-optimization/83304] [8 Regression] FAIL: gcc.c-torture/execute/pr61725.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions

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

--- Comment #9 from Segher Boessenkool  ---
At some point during combine we have

insn_cost 4 for72: r127:SI=0xff81
insn_cost 4 for 9: r130:SI=ctz(r125:SI)
insn_cost 4 for69: cc:CC=cmp(r125:SI,0)
insn_cost 4 for70: r131:SI={(cc:CC!=0)?r130:SI:0x}
  REG_DEAD r130:SI
insn_cost 12 for16: r133:SI=cc:CC==0
  REG_DEAD cc:CC
19: {r134:SI=r131:SI!=0x;clobber cc:CC;}
  REG_UNUSED cc:CC
  REG_DEAD r131:SI

and then it does

Trying 70 -> 19:
   70: r131:SI={(cc:CC!=0)?r130:SI:0x}
  REG_DEAD r130:SI
   19: {r134:SI=r131:SI!=0x;clobber cc:CC;}
  REG_UNUSED cc:CC
  REG_DEAD r131:SI
Failed to match this instruction:
(parallel [
(set (reg:SI 134)
(ne:SI (reg:CC 100 cc)
(const_int 0 [0])))
(clobber (reg:CC 100 cc))
])
Successfully matched this instruction:
(set (reg:SI 134)
(ne:SI (reg:CC 100 cc)
(const_int 0 [0])))
allowing combination of insns 70 and 19
original costs 4 + 16 = 20
replacement cost 12
deferring deletion of insn with uid = 70.
deferring deletion of insn with uid = 9.
modifying insn i319: r134:SI=cc:CC!=0
  REG_DEAD cc:CC
deferring rescan insn with uid = 19.

but the REG_DEAD note on insn 16 is left, although now 19 uses it too.

[Bug c++/83309] Structure elements have O(n^2) compile time slowdown

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

--- Comment #3 from Nathan Sidwell  ---
yeah, I'm not surprised by these numbers.  IIUC the linear search happens when
we get a qualified lookup during parsing.  Unqualified lookup will find the
IDENTIFIER_VALUE binding.  But ICBW.

Anyway, when I tried to fix this piece, I kept running into a wall, due to the
way we try and make all bindings behave somewhat as-if a regular local-scope
binding.  Which is why I ended up punting.  See my gcc cauldron name-lookup
talk.

One bit we could change is keep the MEMBER_VEC sorted during construction. 
That holds member functions during that time.  We'd still need to do the linear
field lookup though, to find non-function members.  Patch for this on the
name-lookup branch.

[Bug middle-end/83164] [8 regression] internal compiler error: verify_gimple failed

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

--- Comment #9 from Jakub Jelinek  ---
Created attachment 42810
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42810&action=edit
gcc8-pr83164.patch

So like this?  It makes no sense to call types_compatible_p or 2x
useless_type_conversion_p if TYPE_MODE is different, because we know the result
- it will not be compatible.  And anything else needs to be allowed due to the
propagation of pointers.

[Bug middle-end/83164] [8 regression] internal compiler error: verify_gimple failed

2017-12-07 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83164

--- Comment #10 from rguenther at suse dot de  ---
On Thu, 7 Dec 2017, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83164
> 
> --- Comment #9 from Jakub Jelinek  ---
> Created attachment 42810
>   --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42810&action=edit
> gcc8-pr83164.patch
> 
> So like this?  It makes no sense to call types_compatible_p or 2x
> useless_type_conversion_p if TYPE_MODE is different, because we know the 
> result
> - it will not be compatible.  And anything else needs to be allowed due to the
> propagation of pointers.
>

Yes, this is ok.

[Bug middle-end/83312] New: [8 regression] bogus -Warray-bounds warning

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

Bug ID: 83312
   Summary: [8 regression] bogus -Warray-bounds warning
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: arnd at linaro dot org
  Target Milestone: ---

I got an odd -Warray-bounds warning for Linux kernel code, original source code
is
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next-history.git/tree/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c?h=next-20171207#n492,
partially reduced test case follows:

struct ptlrpcd_ctl {
  char pc_name[20];
};
struct ptlrpcd {
  struct ptlrpcd_ctl pd_threads[6];
};
struct ptlrpcd *ptlrpcd_init_pd;
static void ptlrpcd_ctl_init(struct ptlrpcd_ctl *pc, int index) {
  if (index < 0)
__builtin_snprintf(pc->pc_name, sizeof(pc->pc_name), "ptlrpcd_rcv");
  else
__builtin_snprintf(pc->pc_name, sizeof(pc->pc_name), "ptlrpcd_%d", index);
}
int ptlrpcd_init_ncpts;
static int ptlrpcd_init(int nthreads) {
  int j;
  if (ptlrpcd_init_ncpts) {
ptlrpcd_ctl_init(&ptlrpcd_init_pd->pd_threads[0], -1);
for (j = 1; j < nthreads; j++)
  ptlrpcd_ctl_init(&ptlrpcd_init_pd->pd_threads[j], j);
  }
  return 0;
}
int ptlrpcd_init_groupsize;
void ptlrpcd_addref(void) {
ptlrpcd_init(ptlrpcd_init_groupsize);
}

$ x86_64-linux-gcc-8.0.0 --version
x86_64-linux-gcc-8.0.0 (GCC) 8.0.0 20171201 (experimental)
$ x86_64-linux-gcc-8.0.0   -c -O2 -Wall   -Werror ptlrpcd.i
ptlrpcd.i: In function 'ptlrpcd_addref':
ptlrpcd.i:10:26: error: array subscript -1 is below array bounds of 'struct
ptlrpcd_ctl[6]' [-Werror=array-bounds]
 __builtin_snprintf(pc->pc_name, sizeof(pc->pc_name), "ptlrpcd_rcv");

Reducing it further leads to nonsensical code with a valid warning that
couldn't really happen in the original code:

struct ptlrpcd_ctl { char pc_name[6]; };
struct { struct ptlrpcd_ctl pd_threads[0]; } b;
int a;
int fn1(char *, long, char *, ...);
void fn2(struct ptlrpcd_ctl *p1, int p2) { if (p2 < 0) fn1(p1->pc_name,
sizeof(p1), ""); }
void fn3() { fn2(&b.pd_threads[a], a); }

[Bug middle-end/83164] [8 regression] internal compiler error: verify_gimple failed

2017-12-07 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83164

--- Comment #11 from Marc Glisse  ---
(In reply to Jakub Jelinek from comment #9)
> Created attachment 42810 [details]
> gcc8-pr83164.patch

Sorry, I shouldn't have taken this long.

> So like this?  It makes no sense to call types_compatible_p or 2x
> useless_type_conversion_p if TYPE_MODE is different, because we know the
> result - it will not be compatible.  And anything else needs to be allowed
> due to the propagation of pointers.

This looks great!

[Bug other/70268] add option -ffile-prefix-map to map one directory name (old) to another (new) in __FILE__, __BASE_FILE__and __builtin_FILE()

2017-12-07 Thread boris at kolpackov dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268

--- Comment #10 from Boris Kolpackov  ---
Second revision of the patch:

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

[Bug tree-optimization/81165] [8 Regression] Regression in GCC-8.0.0's optimizer

2017-12-07 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81165

--- Comment #16 from Alexandre Oliva  ---
Patch posted at https://gcc.gnu.org/ml/gcc-patches/2017-12/msg00376.html
(before seeing Jeff's comments)

Anyway, I think this is simple enough to go into 8.  It isn't hard to add
caching, should we find it to be too expensive without, it would just require
more code to be adjusted to make sure the cache is reset at the end of passes
that use it.

[Bug middle-end/83312] [8 regression] bogus -Warray-bounds warning

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

--- Comment #1 from Marc Glisse  ---
Ironically, it seems to be the same pass, VRP1, that warns that some piece of
code accesses pd_threads[j] for some negative j and later notices that the
corresponding path is dead. I don't know if we can shift things a bit in the
pass to avoid warning on code that the pass itself will remove.

[Bug target/80101] ICE in store_data_bypass_p, at recog.c:3737

2017-12-07 Thread kelvin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80101

--- Comment #6 from kelvin at gcc dot gnu.org ---
Author: kelvin
Date: Thu Dec  7 13:20:27 2017
New Revision: 255465

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

2017-12-07  Kelvin Nilsen  

Backport from trunk
2017-05-08  Kelvin Nilsen  

PR target/80101
* gcc.target/powerpc/pr80101-1.c: New test.


gcc/ChangeLog:

2017-12-07  Kelvin Nilsen  

Backport from trunk
2017-05-08  Kelvin Nilsen  

PR target/80101
* config/rs6000/power6.md: Replace store_data_bypass_p calls with
rs6000_store_data_bypass_p in seven define_bypass directives and
in several comments.
* config/rs6000/rs6000-protos.h: Add prototype for
rs6000_store_data_bypass_p function.
* config/rs6000/rs6000.c (rs6000_store_data_bypass_p): New
function implements slightly different (rs6000-specific) semantics
than store_data_bypass_p, returning false rather than aborting
with assertion error when arguments do not satisfy the
requirements of store data bypass.
(rs6000_adjust_cost): Replace six calls of store_data_bypass_p with
rs6000_store_data_bypass_p.


Added:
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr80101-1.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/config/rs6000/power6.md
branches/gcc-7-branch/gcc/config/rs6000/rs6000-protos.h
branches/gcc-7-branch/gcc/config/rs6000/rs6000.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug tree-optimization/83296] missing -Wstringop-overflow due to missing range info for MAX_EXPR

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

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #3 from Richard Biener  ---
Fixed.

[Bug tree-optimization/83296] missing -Wstringop-overflow due to missing range info for MAX_EXPR

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

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Thu Dec  7 13:21:51 2017
New Revision: 255466

URL: https://gcc.gnu.org/viewcvs?rev=255466&root=gcc&view=rev
Log:
2017-12-07  Richard Biener  

PR tree-optimization/83296
PR tree-optimization/67769
* tree-ssa-phiopt.c (conditional_replacement): Do not reset
flow sensitive info in an unrelated BB.
(value_replacement): Use reset_flow_sensitive_info.
(minmax_replacement): Reset flow sensitive info on the def
we move.  Do not reset flow sensitive info in the whole BB
we move the stmt to.
(abs_replacement): Likewise.

* g++.dg/warn/Wstringop-overflow-1.C: New testcase.

Added:
trunk/gcc/testsuite/g++.dg/warn/Wstringop-overflow-1.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-phiopt.c

[Bug tree-optimization/67769] [6 Regression] VRP pass does wrong optimization

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

--- Comment #7 from Richard Biener  ---
Author: rguenth
Date: Thu Dec  7 13:21:51 2017
New Revision: 255466

URL: https://gcc.gnu.org/viewcvs?rev=255466&root=gcc&view=rev
Log:
2017-12-07  Richard Biener  

PR tree-optimization/83296
PR tree-optimization/67769
* tree-ssa-phiopt.c (conditional_replacement): Do not reset
flow sensitive info in an unrelated BB.
(value_replacement): Use reset_flow_sensitive_info.
(minmax_replacement): Reset flow sensitive info on the def
we move.  Do not reset flow sensitive info in the whole BB
we move the stmt to.
(abs_replacement): Likewise.

* g++.dg/warn/Wstringop-overflow-1.C: New testcase.

Added:
trunk/gcc/testsuite/g++.dg/warn/Wstringop-overflow-1.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-phiopt.c

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

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

Richard Biener  changed:

   What|Removed |Added

   Keywords||diagnostic,
   ||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-12-07
 CC||msebor at gcc dot gnu.org
  Component|middle-end  |tree-optimization
   Target Milestone|--- |8.0
 Ever confirmed|0   |1

--- Comment #2 from Richard Biener  ---
Only jump threading figures it out, VRP has issues with encoding the branches
in ranges (as usual).

GCC 7 has the same range info but for some reason doesn't warn.  Possibly
array-at-struct-end handling improvements exposed this false positive.

[Bug target/83302] i386 stack_probe has side effects

2017-12-07 Thread matz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83302

--- Comment #2 from Michael Matz  ---
I guess the problem described in https://lkml.org/lkml/2017/11/10/188 is, that
the stack probe itself accesses a page which _doesn't_ belong to this threads
stack, but to something else.  golang seems to use tiny stacks without guard
page, and the very idea of -fstack-check is that those probe instructions
either
access the own stack, or the guard page, but never anything else.

So, it's mismatching assumptions between golang and gcc's idea of stack layout,
they are simply incompatible.  I think not using guard pages in golang is not a
very good idea.

[Bug target/83302] i386 stack_probe has side effects

2017-12-07 Thread matz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83302

--- Comment #3 from Michael Matz  ---
In any case, this is not something that GCC could do anything about.  A probe
necessarily has to be a write, and writing to something not belonging to own
stack (or guard page) will always have this problem of seemingly destroying
other data.  The non-atomicness of this particular read-mod-write instruction
doesn't enter the picture.

[Bug target/83302] i386 stack_probe has side effects

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

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #4 from Richard Biener  ---
Invalid.

[Bug demangler/83313] New: A whole lot of symbols cannot be demangled

2017-12-07 Thread jeanmichael.celerier at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83313

Bug ID: 83313
   Summary: A whole lot of symbols cannot be demangled
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: demangler
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jeanmichael.celerier at gmail dot com
  Target Milestone: ---

From my software ; I've got them by running nm -a | c++filt | grep _Z.


_ZN5Nodes5Chord4Node13dispatchChordIZNS1_3runERKN5ossia9midi_portERKN5boost9container8flat_mapIliSt4lessIlENS8_13new_allocatorISt4pairIliERKNS9_IlNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_NSC_ISD_IlSO_ERS4_RNS1_5StateENS3_10time_valueENS3_13token_requestERNS3_15execution_stateEEUlDpOT_E0_EEviRKN2mm11MidiMessageEiSU_OT_
_ZN5Nodes5Chord4Node13dispatchChordIZNS1_3runERKN5ossia9midi_portERKN5boost9container8flat_mapIliSt4lessIlENS8_13new_allocatorISt4pairIliERKNS9_IlNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_NSC_ISD_IlSO_ERS4_RNS1_5StateENS3_10time_valueENS3_13token_requestERNS3_15execution_stateEEUlDpOT_E_EEviRKN2mm11MidiMessageEiSU_OT_

etc etc... whole list here: https://paste.debian.net/999651/

[Bug target/83297] Internal Compiler Error

2017-12-07 Thread suhubdyd at iro dot umontreal.ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83297

Dendi Suhubdy  changed:

   What|Removed |Added

 Resolution|INVALID |MOVED

--- Comment #3 from Dendi Suhubdy  ---
Sure thanks, it happened to be specific on Intell Haswell machines, weirdly.

[Bug fortran/81827] Large compile time with derived-type rrays

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

--- Comment #15 from Richard Biener  ---
Bisected to pauls r254427, the fix for PR81447 and PR82783.

Test adjustments suggest that we'll create even more malloc/free calls.

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

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
Started with r254830.

[Bug sanitizer/82046] [7/8 Regression] Bogus -fsanitize=undefined error with -O2 -Wall

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

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #6 from Jakub Jelinek  ---
Wontfix then.

[Bug target/83302] i386 stack_probe has side effects

2017-12-07 Thread fw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83302

--- Comment #5 from Florian Weimer  ---
FWIW, -fstack-clash-protection avoids these issues.

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

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug tree-optimization/80907] [6/7 Regression] False positive: "warning: array subscript is above array bounds"

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug c++/80947] [6/7 Regression] Different visibility for the lambda and its capture list members with -fvisibility=hidden

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug c++/81197] [7/8 Regression] ICE with structured binding and lifetime-extended temporaries

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug fortran/81304] [6/7 Regression] Bogus warning with -Wsurprising and -fopenmp: Type specified for intrinsic function 'min' / 'max'

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P4

[Bug target/81481] [7 Regression] Spills %xmm to stack in glibc strspn SSE 4.2 variant

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

--- Comment #7 from Richard Biener  ---
Patch has been applied to our GCC 7 with no issues sofar (but fixing the
reported issues).

[Bug c/81566] [6/7/8 Regression] invalid attribute aligned accepted on functions

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

--- Comment #6 from Richard Biener  ---
> gcc-6 t.c -S
t.c:6:1: error: requested alignment is not a positive power of 2
 int __attribute__ ((aligned (0))) f (void);
 ^~~
t.c:12:1: error: requested alignment is not a positive power of 2
 int __attribute__ ((aligned (0))) g (void);
 ^~~

> gcc-7 t.c -S

so GCC 6 works for the accepts-invalid.  Splitting the bug might help.

I guess it's reasonable to fix the accepts-invalid even for GCC 7.3.

[Bug target/81572] [7/8 Regression] gcc-7 regression: unnecessary vector regmove on compare

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
  Known to work||6.4.0
Version|unknown |7.2.0

[Bug target/82641] Unable to enable crc32 for a certain function with target attribute on ARM (aarch32)

2017-12-07 Thread tnfchris at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82641

--- Comment #11 from Tamar Christina  ---
Author: tnfchris
Date: Thu Dec  7 14:54:22 2017
New Revision: 255468

URL: https://gcc.gnu.org/viewcvs?rev=255468&root=gcc&view=rev
Log:
2017-12-07  Tamar Christina  

PR target/82641
* config/arm/arm.c (INCLUDE_STRING): Define.
(arm_last_printed_arch_string, arm_last_printed_fpu_string): New.
(arm_declare_function_name): Conservatively emit .arch,
.arch_extensions
and .fpu.

gcc/testsuite/
2017-12-07  Tamar Christina  

PR target/82641
* gcc.target/arm/pragma_arch_attribute_2.c: New.
* gcc.target/arm/pragma_arch_attribute_2.c: New.
* gcc.target/arm/pragma_arch_attribute_3.c: New.
* gcc.target/arm/pragma_fpu_attribute.c: New.
* gcc.target/arm/pragma_fpu_attribute_2.c: New.


Added:
trunk/gcc/testsuite/gcc.target/arm/pragma_arch_attribute_2.c
trunk/gcc/testsuite/gcc.target/arm/pragma_arch_attribute_3.c
trunk/gcc/testsuite/gcc.target/arm/pragma_fpu_attribute.c
trunk/gcc/testsuite/gcc.target/arm/pragma_fpu_attribute_2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/arm/arm.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/81575] [7/8 Regression] ICE on C++ code: in cp_build_addr_expr_1, at cp/typeck.c:5793

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug sanitizer/81601] [7/8 Regression] incorrect Warray-bounds warning with -fsanitize

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug target/81613] [7 regression] FAIL: gfortran.dg/intrinsic_modulo_1.f90 -O3 -g execution test

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug target/81613] [7 regression] FAIL: gfortran.dg/intrinsic_modulo_1.f90 -O3 -g execution test

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P2  |P4

[Bug c++/81675] [6/7 Regression] attribute(noreturn) of destructor in :? not honored

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
Summary|[6/7/8 Regression]  |[6/7 Regression]
   |attribute(noreturn) of  |attribute(noreturn) of
   |destructor in :? not|destructor in :? not
   |honored |honored

[Bug target/82641] Unable to enable crc32 for a certain function with target attribute on ARM (aarch32)

2017-12-07 Thread tnfchris at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82641

Tamar Christina  changed:

   What|Removed |Added

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

--- Comment #12 from Tamar Christina  ---
That should do it.

[Bug middle-end/81782] [7/8 Regression] Yet another -Wmaybe-uninitialized false positive with empty array

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org

--- Comment #5 from Richard Biener  ---
I think this one should be WONTFIX.  OTOH it might be handled by

  /* Do not warn if the access is fully outside of the
 variable.  */
  if (DECL_P (base)
  && ref.size != -1
  && ref.max_size == ref.size
  && (ref.offset + ref.size <= 0
  || (ref.offset >= 0
  && DECL_SIZE (base)
  && TREE_CODE (DECL_SIZE (base)) == INTEGER_CST
  && compare_tree_int (DECL_SIZE (base),
   ref.offset) <= 0)))
continue;

which for whatever reason doesn't handle it?

Will have a look.

[Bug middle-end/83239] Improve (or eliminate) diagnostics related to loop distribution

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

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||dmalcolm at gcc dot gnu.org
   Assignee|msebor at gcc dot gnu.org  |law at redhat dot com
Summary|False positive from |Improve (or eliminate)
   |-Wstringop-overflow on  |diagnostics related to loop
   |simple std::vector code |distribution

--- Comment #12 from Jeffrey A. Law  ---
I was looking at this again tonight, and I clearly missed the interaction
between known ranges and the overflow check.

If we look at the .vrp1 dump we see this overflow check in bb16:

23 = ASSERT_EXPR <_13, _13 > 2>;
_1 = _23 + 18446744073709551614;
if (_1 > _23)
  goto ; [33.00%]
else
  goto ; [67.00%]

This is a controlling condition for the clearing loop which ldist will turn
into a memset.

The range for _23 is:

(gdb) p debug_value_range (get_value_range (gimple_cond_rhs (stmt)))
[3, +INF]  EQUIVALENCES: { _13 } (1 elements)

Exactly what we'd expect given the ASSERT_EXPR.  So far so good.

The condition can be rewritten as _23 - 2 > _23, which is only going to be true
if _23 has the value 0 or 1.  So we can deduce that the condition is always
false.

We're correctly identifying the test as an overflow check in VRP, but we're not
optimizing it.  I think we just need to extend
vr_values::vrp_evaluate_conditional_warnv_with_ops and the right things should
just happen.

[Bug middle-end/82016] [8 regression] test case gcc.target/powerpc/float128-type-1.c fails after r251260

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek  ---
This doesn't FAIL since ~ Sep 6/7th, my rough guess is r251814.  Has it been
fixed or is it just latent?

[Bug c++/81922] [6/7/8 Regression] ICE in output_constructor_regular_field, at varasm.c:5030

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
We have a bunch of other PRs for the lack of diagnostics of invalid
initialization of flexible array members inside of arrays to non-empty array.
We just should diagnose it as invalid.

[Bug go/79281] gccgo: Binaries using goroutines crash on m68k

2017-12-07 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79281

--- Comment #15 from John Paul Adrian Glaubitz  ---
(In reply to Ian Lance Taylor from comment #11)
> Thanks.  I committed the patch to the GCC 6 branch.
> 
> GCC 7 will require a different fix, as the code has moved from C to Go.  I'm
> not sure what the best approach is.

Just as a heads-up: I just successfully built gcc-7 with the Go frontend
enabled on m68k without any issues (gcc-7_7.2.0 - SVN r255408). It did not work
when I tested a gcc-7 snapshot from 20170221.

I did not perform any extended tests yet though, so I don't know whether there
are other issues left.

[Bug c++/64867] warning for passing non-POD to varargs function

2017-12-07 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64867

Eric Gallager  changed:

   What|Removed |Added

   Keywords||easyhack
 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |egallager at gcc dot 
gnu.org

--- Comment #22 from Eric Gallager  ---
(In reply to Jonathan Wakely from comment #21)
> No, because it doesn't have any tests.
> 
> It should probably adjust:
> 
> ../gcc/testsuite/g++.dg/overload/ellipsis1.C
> ../gcc/testsuite/g++.dg/overload/ellipsis2.C
> ../gcc/testsuite/g++.old-deja/g++.pt/vaarg3.C
> 
> to use the new flag, and add a test that the new flag is enabled by
> -Wconditionally-supported

OK, I think I can do this.

[Bug go/83314] New: gccgo: Compiled binaries panic with "mmap errno 9" on m68k

2017-12-07 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83314

Bug ID: 83314
   Summary: gccgo: Compiled binaries panic with "mmap errno 9" on
m68k
   Product: gcc
   Version: 7.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: go
  Assignee: ian at airs dot com
  Reporter: glaubitz at physik dot fu-berlin.de
CC: cmang at google dot com, doko at gcc dot gnu.org, ian at 
airs dot com,
jrtc27 at jrtc27 dot com, schwab at gcc dot gnu.org
  Target Milestone: ---

Trying to run a natively compiled Go program with gccgo-7 (SVN r255408) on m68k
fails with "mmap errno 9":

(sid-m68k-sbuild)root@nofan:/# cat hello.go 
package main 

import "fmt"



func main() {
fmt.Println("hello world")
}

(sid-m68k-sbuild)root@nofan:/# gccgo-7 hello.go -o hello
(sid-m68k-sbuild)root@nofan:/# ./hello 
mmap errno 9
fatal error: mmap

runtime stack:
mmap errno 9
fatal error: mmap
panic during panic

runtime stack:
mmap errno 9
fatal error: mmap
stack trace unavailable
(sid-m68k-sbuild)root@nofan:/#

[Bug ipa/83179] [8 regression] gcc.dg/ipa/inline-1.c fail

2017-12-07 Thread andrey.y.guskov at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83179

--- Comment #10 from Andrey Guskov  ---
32-bit SPEC CPU2006::436 also affected.

[Bug boehm-gc/57761] USE_PROC_FOR_LIBRARIES does not work correctly

2017-12-07 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57761

Eric Gallager  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-12-07
 Ever confirmed|0   |1

--- Comment #2 from Eric Gallager  ---
WAITING on a link to an upstream bug so I can close this as RESOLVED MOVED,
otherwise I'll close it as RESOLVED WONTFIX in 3 months.

[Bug bootstrap/59447] --with-dwarf2 should be documented as meaning "DWARF 2 or later" instead of just "DWARF 2"

2017-12-07 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59447

Eric Gallager  changed:

   What|Removed |Added

Summary|--with-dwarf2 is not|--with-dwarf2 should be
   |propagated correctly, will  |documented as meaning
   |always create dwarf4 by |"DWARF 2 or later" instead
   |default |of just "DWARF 2"

--- Comment #3 from Eric Gallager  ---
(In reply to Eric Gallager from comment #2)
> (In reply to jos...@codesourcery.com from comment #1)
> > This is a documentation bug - the installation manual should make clear 
> > that "DWARF 2" in the description of this option means DWARF 2 or later, 
> > as appropriate for the target, as opposed to (for example) STABS.
> 
> Confirmed, the documentation for --with-dwarf2 is still just:
> 
> --with-dwarf2
> 
> Specify that the compiler should use DWARF 2 debugging information as
> the default.

Updating title to reflect the actual issue

[Bug target/81356] __builtin_strcpy is not good for copying an empty string on aarch64

2017-12-07 Thread wilco at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81356

Wilco  changed:

   What|Removed |Added

 CC||wilco at gcc dot gnu.org

--- Comment #9 from Wilco  ---
I presume this can be closed now?

[Bug target/83315] New: PowerPC xmmintrin.h emulation for _mm_{min,max}_ps not semantically equivalent

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

Bug ID: 83315
   Summary: PowerPC xmmintrin.h emulation for _mm_{min,max}_ps not
semantically equivalent
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dje at gcc dot gnu.org
  Target Milestone: ---

PowerPC port xmmintrin.h _mm_min_ps invokes Power vec_min instrinsic and
_mm_max_ps invokes Power vec_max instrinsic.  vec_min corresponds to the
xsminsp instruction and vec_max corresponds to the xsmaxsp instruction.  The
Power instructions implement different semantics for NaN than the Intel
equivalents.  The Power ISA 3.0 (Power9) xsmincsp and xsmaxcsp instructions
correspond to the Intel semantics.

[Bug target/83315] PowerPC xmmintrin.h emulation for _mm_{min,max}_ps not semantically equivalent

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

David Edelsohn  changed:

   What|Removed |Added

   Keywords||wrong-code
 Target||powerpc*-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-12-07
 CC||segher at gcc dot gnu.org,
   ||wschmidt at gcc dot gnu.org
 Ever confirmed|0   |1

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

[Bug c/81566] [6/7/8 Regression] invalid attribute aligned accepted on functions

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

--- Comment #7 from Martin Sebor  ---
Author: msebor
Date: Thu Dec  7 16:32:03 2017
New Revision: 255469

URL: https://gcc.gnu.org/viewcvs?rev=255469&root=gcc&view=rev
Log:
PR c/81544 - attribute noreturn and warn_unused_result on the same function
accepted
PR c/81566 - invalid attribute aligned accepted on functions

gcc/ada/ChangeLog:

PR c/81544
* gcc-interface/utils.c (gnat_internal_attribute_table): Initialize
new member of struct attribute_spec.

gcc/c/ChangeLog:

PR c/81544
* c-decl.c (c_decl_attributes): Look up existing declaration and
pass it to decl_attributes.

gcc/c-family/ChangeLog:

PR c/81544
PR c/81566
* c-attribs.c (attr_aligned_exclusions): New array.
(attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
(attr_common_exclusions, attr_const_pure_exclusions): Same.
(attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
(attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
(attr_warn_unused_result_exclusions): Same.
(handle_hot_attribute, handle_cold_attribute): Simplify.
(handle_const_attribute): Warn on function returning void.
(handle_pure_attribute): Same.
(handle_aligned_attribute): Diagnose conflicting attribute
specifications.
* c-warn.c (diagnose_mismatched_attributes): Simplify.

gcc/cp/ChangeLog:

PR c/81544
* cp-tree.h (decls_match): Add default argument.
* decl.c (decls_match): Avoid calling into the target back end
and triggering an error.
* decl2.c (cplus_decl_attributes): Look up existing declaration and
pass it to decl_attributes.
* tree.c (cxx_attribute_table): Initialize new member of struct
attribute_spec.

gcc/fortran/ChangeLog:

PR c/81544
* f95-lang.c (gfc_attribute_table): Initialize new member of struct
attribute_spec.

gcc/lto/ChangeLog:

PR c/81544
* lto-lang.c (lto_attribute_table): Initialize new member of struct
attribute_spec.

gcc/ChangeLog:

PR c/81544
* attribs.c (empty_attribute_table): Initialize new member of
struct attribute_spec.
(decl_attributes): Add argument.  Handle mutually exclusive
combinations of attributes.
(selftests::test_attribute_exclusions): New function.
(selftests::attribute_c_tests): Ditto.
* attribs.h (decl_attributes): Add default argument.
* selftest.h (attribute_c_tests): Declare.
* selftest-run-tests.c (selftest::run_tests): Call attribute_c_tests.
* tree-core.h (attribute_spec::exclusions, exclude): New type and
member.
* doc/extend.texi (Common Function Attributes): Update const and pure.

gcc/testsuite/ChangeLog:

PR c/81544
* c-c++-common/Wattributes-2.c: New test.
* c-c++-common/Wattributes.c: New test.
* c-c++-common/attributes-3.c: Adjust.
* gcc.dg/Wattributes-6.c: New test.
* gcc.dg/Wattributes-7.c: New test.
* gcc.dg/attr-noinline.c
* gcc.dg/pr44964.c: Same.
* gcc.dg/torture/pr42363.c: Same.
* gcc.dg/tree-ssa/ssa-ccp-2.c: Same.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/gcc-interface/utils.c
trunk/gcc/attribs.c
trunk/gcc/attribs.h
trunk/gcc/brig/brig-lang.c
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-attribs.c
trunk/gcc/c-family/c-warn.c
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-decl.c
trunk/gcc/config/alpha/alpha.c
trunk/gcc/config/arc/arc.c
trunk/gcc/config/arm/arm.c
trunk/gcc/config/avr/avr.c
trunk/gcc/config/bfin/bfin.c
trunk/gcc/config/cr16/cr16.c
trunk/gcc/config/epiphany/epiphany.c
trunk/gcc/config/h8300/h8300.c
trunk/gcc/config/i386/i386.c
trunk/gcc/config/ia64/ia64.c
trunk/gcc/config/m32c/m32c.c
trunk/gcc/config/m32r/m32r.c
trunk/gcc/config/m68k/m68k.c
trunk/gcc/config/mcore/mcore.c
trunk/gcc/config/microblaze/microblaze.c
trunk/gcc/config/mips/mips.c
trunk/gcc/config/msp430/msp430.c
trunk/gcc/config/nds32/nds32.c
trunk/gcc/config/nvptx/nvptx.c
trunk/gcc/config/powerpcspe/powerpcspe.c
trunk/gcc/config/rl78/rl78.c
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/config/rx/rx.c
trunk/gcc/config/s390/s390.c
trunk/gcc/config/sh/sh.c
trunk/gcc/config/sparc/sparc.c
trunk/gcc/config/spu/spu.c
trunk/gcc/config/stormy16/stormy16.c
trunk/gcc/config/v850/v850.c
trunk/gcc/config/visium/visium.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/decl.c
trunk/gcc/cp/decl2.c
trunk/gcc/cp/tree.c
trunk/gcc/doc/extend.texi
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/f95-lang.c
trunk/gcc/lto/ChangeLog
trunk/gcc/lto/lto-lang.c
trunk/gcc/selftest-run-tests.c
trunk/gcc/selftest.h

[Bug c/81544] attribute noreturn and warn_unused_result on the same function accepted

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

--- Comment #3 from Martin Sebor  ---
Author: msebor
Date: Thu Dec  7 16:32:03 2017
New Revision: 255469

URL: https://gcc.gnu.org/viewcvs?rev=255469&root=gcc&view=rev
Log:
PR c/81544 - attribute noreturn and warn_unused_result on the same function
accepted
PR c/81566 - invalid attribute aligned accepted on functions

gcc/ada/ChangeLog:

PR c/81544
* gcc-interface/utils.c (gnat_internal_attribute_table): Initialize
new member of struct attribute_spec.

gcc/c/ChangeLog:

PR c/81544
* c-decl.c (c_decl_attributes): Look up existing declaration and
pass it to decl_attributes.

gcc/c-family/ChangeLog:

PR c/81544
PR c/81566
* c-attribs.c (attr_aligned_exclusions): New array.
(attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
(attr_common_exclusions, attr_const_pure_exclusions): Same.
(attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
(attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
(attr_warn_unused_result_exclusions): Same.
(handle_hot_attribute, handle_cold_attribute): Simplify.
(handle_const_attribute): Warn on function returning void.
(handle_pure_attribute): Same.
(handle_aligned_attribute): Diagnose conflicting attribute
specifications.
* c-warn.c (diagnose_mismatched_attributes): Simplify.

gcc/cp/ChangeLog:

PR c/81544
* cp-tree.h (decls_match): Add default argument.
* decl.c (decls_match): Avoid calling into the target back end
and triggering an error.
* decl2.c (cplus_decl_attributes): Look up existing declaration and
pass it to decl_attributes.
* tree.c (cxx_attribute_table): Initialize new member of struct
attribute_spec.

gcc/fortran/ChangeLog:

PR c/81544
* f95-lang.c (gfc_attribute_table): Initialize new member of struct
attribute_spec.

gcc/lto/ChangeLog:

PR c/81544
* lto-lang.c (lto_attribute_table): Initialize new member of struct
attribute_spec.

gcc/ChangeLog:

PR c/81544
* attribs.c (empty_attribute_table): Initialize new member of
struct attribute_spec.
(decl_attributes): Add argument.  Handle mutually exclusive
combinations of attributes.
(selftests::test_attribute_exclusions): New function.
(selftests::attribute_c_tests): Ditto.
* attribs.h (decl_attributes): Add default argument.
* selftest.h (attribute_c_tests): Declare.
* selftest-run-tests.c (selftest::run_tests): Call attribute_c_tests.
* tree-core.h (attribute_spec::exclusions, exclude): New type and
member.
* doc/extend.texi (Common Function Attributes): Update const and pure.

gcc/testsuite/ChangeLog:

PR c/81544
* c-c++-common/Wattributes-2.c: New test.
* c-c++-common/Wattributes.c: New test.
* c-c++-common/attributes-3.c: Adjust.
* gcc.dg/Wattributes-6.c: New test.
* gcc.dg/Wattributes-7.c: New test.
* gcc.dg/attr-noinline.c
* gcc.dg/pr44964.c: Same.
* gcc.dg/torture/pr42363.c: Same.
* gcc.dg/tree-ssa/ssa-ccp-2.c: Same.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/gcc-interface/utils.c
trunk/gcc/attribs.c
trunk/gcc/attribs.h
trunk/gcc/brig/brig-lang.c
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-attribs.c
trunk/gcc/c-family/c-warn.c
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-decl.c
trunk/gcc/config/alpha/alpha.c
trunk/gcc/config/arc/arc.c
trunk/gcc/config/arm/arm.c
trunk/gcc/config/avr/avr.c
trunk/gcc/config/bfin/bfin.c
trunk/gcc/config/cr16/cr16.c
trunk/gcc/config/epiphany/epiphany.c
trunk/gcc/config/h8300/h8300.c
trunk/gcc/config/i386/i386.c
trunk/gcc/config/ia64/ia64.c
trunk/gcc/config/m32c/m32c.c
trunk/gcc/config/m32r/m32r.c
trunk/gcc/config/m68k/m68k.c
trunk/gcc/config/mcore/mcore.c
trunk/gcc/config/microblaze/microblaze.c
trunk/gcc/config/mips/mips.c
trunk/gcc/config/msp430/msp430.c
trunk/gcc/config/nds32/nds32.c
trunk/gcc/config/nvptx/nvptx.c
trunk/gcc/config/powerpcspe/powerpcspe.c
trunk/gcc/config/rl78/rl78.c
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/config/rx/rx.c
trunk/gcc/config/s390/s390.c
trunk/gcc/config/sh/sh.c
trunk/gcc/config/sparc/sparc.c
trunk/gcc/config/spu/spu.c
trunk/gcc/config/stormy16/stormy16.c
trunk/gcc/config/v850/v850.c
trunk/gcc/config/visium/visium.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/decl.c
trunk/gcc/cp/decl2.c
trunk/gcc/cp/tree.c
trunk/gcc/doc/extend.texi
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/f95-lang.c
trunk/gcc/lto/ChangeLog
trunk/gcc/lto/lto-lang.c
trunk/gcc/selftest-run-tests.c
trunk/gcc/selftest.h

[Bug c/81544] attribute noreturn and warn_unused_result on the same function accepted

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

Martin Sebor  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Assignee|mpolacek at gcc dot gnu.org|msebor at gcc dot 
gnu.org

--- Comment #4 from Martin Sebor  ---
Fixed via 255469.

[Bug c/81566] [6/7 Regression] invalid attribute aligned accepted on functions

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

Martin Sebor  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
   Assignee|msebor at gcc dot gnu.org  |unassigned at gcc dot 
gnu.org
Summary|[6/7/8 Regression] invalid  |[6/7 Regression] invalid
   |attribute aligned accepted  |attribute aligned accepted
   |on functions|on functions

--- Comment #8 from Martin Sebor  ---
Fixed in 8.0 via r255469.  GCC 8 issues the warnings below.  Removing the 8
regression.

The patch seems too big to backport to older branches though it may be possible
to extract just the subset of the patch that fixes this issue and backport it. 
I don't expect to have the cycles to work on in in stage 3/4 so I'll unassign
myself from the bug for now.

pr81566.c:3:1: warning: ignoring attribute ‘aligned (4)’ because it conflicts
with attribute ‘aligned (16)’ [-Wattributes]
 int __attribute__ ((aligned (4))) f (void);
 ^~~
pr81566.c:1:31: note: previous declaration here
 int __attribute__ ((aligned)) f (void);
   ^
pr81566.c:4:1: warning: ignoring attribute ‘aligned (2)’ because it conflicts
with attribute ‘aligned (16)’ [-Wattributes]
 int __attribute__ ((aligned (2))) f (void);
 ^~~
pr81566.c:3:35: note: previous declaration here
 int __attribute__ ((aligned (4))) f (void);
   ^
pr81566.c:5:1: warning: ignoring attribute ‘aligned (1)’ because it conflicts
with attribute ‘aligned (16)’ [-Wattributes]
 int __attribute__ ((aligned (1))) f (void);
 ^~~
pr81566.c:4:35: note: previous declaration here
 int __attribute__ ((aligned (2))) f (void);
   ^
pr81566.c:11:1: warning: ignoring attribute ‘aligned (1)’ because it conflicts
with attribute ‘aligned (2)’ [-Wattributes]
 int __attribute__ ((aligned (1))) g (void);
 ^~~
pr81566.c:10:35: note: previous declaration here
 int __attribute__ ((aligned (2))) g (void);
   ^

[Bug go/83308] Missing platform definitions for SH in libgo

2017-12-07 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83308

--- Comment #4 from Ian Lance Taylor  ---
gccgo does work on a number of targets that do not have split stack support. 
The downsides are that each goroutine has a much larger stack, and if you have
too much recursion you can run out of stack space and crash.  But most programs
work fine.

[Bug go/83314] gccgo: Compiled binaries panic with "mmap errno 9" on m68k

2017-12-07 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83314

--- Comment #1 from Ian Lance Taylor  ---
errno 9 is EBADF, which doesn't make much sense since libgo only ever calls
mmap with MAP_ANONYMOUS.  And I'm not even sure where those messages are coming
from.  I don't see any place where the GCC 7 libgo will print "mmap errno" or
"fatal error: mmap".

[Bug c++/81922] [6/7/8 Regression] ICE in output_constructor_regular_field, at varasm.c:5030

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

--- Comment #3 from Jakub Jelinek  ---
Created attachment 42811
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42811&action=edit
gcc8-pr81922.patch

WIP patch that attempts to handle it like the C FE, will work on testcases
tomorrow.

[Bug c++/80135] [6/7/8 Regression] ICE in output_constructor_regular_field, at varasm.c:4968

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

--- Comment #8 from Jakub Jelinek  ---
Untested WIP patch attached to PR81922.

[Bug middle-end/83164] [8 regression] internal compiler error: verify_gimple failed

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

--- Comment #12 from Jakub Jelinek  ---
Author: jakub
Date: Thu Dec  7 17:06:08 2017
New Revision: 255470

URL: https://gcc.gnu.org/viewcvs?rev=255470&root=gcc&view=rev
Log:
PR middle-end/83164
* tree-cfg.c (verify_gimple_assign_binary): Don't require
types_compatible_p, just that TYPE_MODE is the same.

* gcc.c-torture/compile/pr83164.c: New test.

Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr83164.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-cfg.c

[Bug go/83314] gccgo: Compiled binaries panic with "mmap errno 9" on m68k

2017-12-07 Thread jrtc27 at jrtc27 dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83314

--- Comment #2 from James Clarke  ---
My guess is libbacktrace/mmapio.c (perhaps mmap.c), which calls mmap with
MAP_PRIVATE, and calls `error_callback (data, "mmap", errno)` on failure.
That's a function pointer, which I would assume is error_callback in
libgo/runtime/go-caller{,s}.c, both of which call backtrace things.

[Bug go/83314] gccgo: Compiled binaries panic with "mmap errno 9" on m68k

2017-12-07 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83314

--- Comment #3 from Ian Lance Taylor  ---
Ah, of course.  Thanks.  In that case mmap is being called with a descriptor
that is the executable itself, as opened by fileline_initialize in
libbacktrace/fileline.c.  I wonder why mmap fails on that?  Can you debug?

[Bug middle-end/83164] [8 regression] internal compiler error: verify_gimple failed

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

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #13 from Jakub Jelinek  ---
Fixed.

[Bug go/83314] gccgo: Compiled binaries panic with "mmap errno 9" on m68k

2017-12-07 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83314

--- Comment #4 from John Paul Adrian Glaubitz  ---
Ok, I should have actually tested this on real hardware right away.

Here's on my Amiga 4000:

root@elgar:~> ./hello 
5662
fatal error: memstats.heap_live not aligned to 8 bytes

goroutine 16 [running, locked to thread]:
runtime.dopanic
../../../src/libgo/go/runtime/panic.go:832
runtime.throw
../../../src/libgo/go/runtime/panic.go:758
futexwakeup addr=0xc111aa0e returned -1
fatal error: unexpected signal during runtime execution
panic during panic
[signal SIGSEGV: segmentation violation code=1 addr=4102 pc=3233247334]
futexwakeup addr=0xc111aa0e returned -1
fatal error: unexpected signal during runtime execution
stack trace unavailable
root@elgar:~>

On a sidenote: That's probably the first time Go is running on an Amiga!

[Bug go/83314] gccgo: Compiled binaries panic with "mmap errno 9" on m68k

2017-12-07 Thread jrtc27 at jrtc27 dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83314

--- Comment #5 from James Clarke  ---
(In reply to John Paul Adrian Glaubitz from comment #4)
> Ok, I should have actually tested this on real hardware right away.
> 
> Here's on my Amiga 4000:
> 
> root@elgar:~> ./hello 
> 5662
> fatal error: memstats.heap_live not aligned to 8 bytes

heap_live is a uint64, which is only 2-byte aligned on m68k. Either m68k needs
to force stronger alignment here, or the assertion needs dropping for m68k.

> 
> goroutine 16 [running, locked to thread]:
> runtime.dopanic
> ../../../src/libgo/go/runtime/panic.go:832
> runtime.throw
> ../../../src/libgo/go/runtime/panic.go:758
> futexwakeup addr=0xc111aa0e returned -1

Futexes must always be 4-byte aligned (kernel requirement), but on m68k ints
only need 2-byte alignment.

> fatal error: unexpected signal during runtime execution
> panic during panic
> [signal SIGSEGV: segmentation violation code=1 addr=4102 pc=3233247334]
> futexwakeup addr=0xc111aa0e returned -1
> fatal error: unexpected signal during runtime execution
> stack trace unavailable
> root@elgar:~>
> 
> On a sidenote: That's probably the first time Go is running on an Amiga!

[Bug rtl-optimization/80818] LRA clobbers live hard reg clobbered during rematerialization

2017-12-07 Thread vmakarov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80818

--- Comment #12 from Vladimir Makarov  ---
Author: vmakarov
Date: Thu Dec  7 17:50:54 2017
New Revision: 255471

URL: https://gcc.gnu.org/viewcvs?rev=255471&root=gcc&view=rev
Log:
2017-12-07  Vladimir Makarov  

PR target/83252
PR rtl-optimization/80818
* lra.c (add_regs_to_insn_regno_info): Make a hard reg in CLOBBER
always early clobbered.
* lra-lives.c (process_bb_lives): Check input hard regs for early
clobbered non-operand hard reg.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/lra-lives.c
trunk/gcc/lra.c

[Bug target/83252] [8 Regression] Wrong code with "-march=skylake-avx512 -O3"

2017-12-07 Thread vmakarov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83252

--- Comment #14 from Vladimir Makarov  ---
Author: vmakarov
Date: Thu Dec  7 17:50:54 2017
New Revision: 255471

URL: https://gcc.gnu.org/viewcvs?rev=255471&root=gcc&view=rev
Log:
2017-12-07  Vladimir Makarov  

PR target/83252
PR rtl-optimization/80818
* lra.c (add_regs_to_insn_regno_info): Make a hard reg in CLOBBER
always early clobbered.
* lra-lives.c (process_bb_lives): Check input hard regs for early
clobbered non-operand hard reg.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/lra-lives.c
trunk/gcc/lra.c

[Bug go/83308] Missing platform definitions for SH in libgo

2017-12-07 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83308

--- Comment #5 from John Paul Adrian Glaubitz  ---
(In reply to Ian Lance Taylor from comment #4)
> gccgo does work on a number of targets that do not have split stack support.
> The downsides are that each goroutine has a much larger stack, and if you
> have too much recursion you can run out of stack space and crash.  But most
> programs work fine.

I'll give it a try and if it works, I'll send a patch :).

[Bug tree-optimization/81303] [8 Regression] 410.bwaves regression caused by r249919

2017-12-07 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81303

--- Comment #11 from amker at gcc dot gnu.org ---
Author: amker
Date: Thu Dec  7 18:03:53 2017
New Revision: 255472

URL: https://gcc.gnu.org/viewcvs?rev=255472&root=gcc&view=rev
Log:
PR tree-optimization/81303
* Makefile.in (gimple-loop-interchange.o): New object file.
* common.opt (floop-interchange): Reuse the option from graphite.
* doc/invoke.texi (-floop-interchange): Ditto.  New document for
-floop-interchange and mention it for -O3.
* opts.c (default_options_table): Enable -floop-interchange at -O3.
* gimple-loop-interchange.cc: New file.
* params.def (PARAM_LOOP_INTERCHANGE_MAX_NUM_STMTS): New parameter.
(PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): New parameter.
* passes.def (pass_linterchange): New pass.
* timevar.def (TV_LINTERCHANGE): New time var.
* tree-pass.h (make_pass_linterchange): New declaration.
* tree-ssa-loop-ivcanon.c (create_canonical_iv): Change to external
interchange.  Record IV before/after increment in new parameters.
* tree-ssa-loop-ivopts.h (create_canonical_iv): New declaration.
* tree-vect-loop.c (vect_is_simple_reduction): Factor out reduction
path check into...
(check_reduction_path): ...New function here.
* tree-vectorizer.h (check_reduction_path): New declaration.

gcc/testsuite
* gcc.dg/tree-ssa/loop-interchange-1.c: New test.
* gcc.dg/tree-ssa/loop-interchange-1b.c: New test.
* gcc.dg/tree-ssa/loop-interchange-2.c: New test.
* gcc.dg/tree-ssa/loop-interchange-3.c: New test.
* gcc.dg/tree-ssa/loop-interchange-4.c: New test.
* gcc.dg/tree-ssa/loop-interchange-5.c: New test.
* gcc.dg/tree-ssa/loop-interchange-6.c: New test.
* gcc.dg/tree-ssa/loop-interchange-7.c: New test.
* gcc.dg/tree-ssa/loop-interchange-8.c: New test.
* gcc.dg/tree-ssa/loop-interchange-9.c: New test.
* gcc.dg/tree-ssa/loop-interchange-10.c: New test.
* gcc.dg/tree-ssa/loop-interchange-11.c: New test.
* gcc.dg/tree-ssa/loop-interchange-12.c: New test.
* gcc.dg/tree-ssa/loop-interchange-13.c: New test.

Added:
trunk/gcc/gimple-loop-interchange.cc
trunk/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-1.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-10.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-11.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-12.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-13.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-1b.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-2.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-3.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-4.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-5.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-6.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-7.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-8.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-9.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/Makefile.in
trunk/gcc/common.opt
trunk/gcc/doc/invoke.texi
trunk/gcc/opts.c
trunk/gcc/params.def
trunk/gcc/passes.def
trunk/gcc/testsuite/ChangeLog
trunk/gcc/timevar.def
trunk/gcc/tree-pass.h
trunk/gcc/tree-ssa-loop-ivcanon.c
trunk/gcc/tree-ssa-loop-ivopts.h
trunk/gcc/tree-vect-loop.c
trunk/gcc/tree-vectorizer.h

[Bug tree-optimization/83253] -ftree-slsr causes performance regression

2017-12-07 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83253

--- Comment #3 from Bill Schmidt  ---
Apologies for not responding sooner -- I've been out of pocket for the last
week.  I'll have a look when I get unburied (probably next week).

Bill

[Bug testsuite/82006] [8 Regression] ERROR: torture-init: torture_without_loops is not empty as expected

2017-12-07 Thread rai...@emrich-ebersheim.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82006

--- Comment #7 from Rainer Emrich  ---
(In reply to Jakub Jelinek from comment #5)
> Any progress on this?

Yeah, I have no exact analysis yet, but the issue is caused by Richards commit
r251220. I wonder how this can cause the tcl errors.
I will provide some more details of the issue later when the testsuite run is
finished.

[Bug target/83252] [8 Regression] Wrong code with "-march=skylake-avx512 -O3"

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

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||law at redhat dot com
 Resolution|--- |FIXED

--- Comment #15 from Jeffrey A. Law  ---
Fixed by Vlad's change on the trunk.  Hopefully for good this time :-)

[Bug rtl-optimization/80818] LRA clobbers live hard reg clobbered during rematerialization

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

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||law at redhat dot com
 Resolution|--- |FIXED

--- Comment #13 from Jeffrey A. Law  ---
Fixed by Vlad commit on the trunk.

[Bug libstdc++/83120] [8 Regression] ext/special_functions/hyperg failure on AIX

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

--- Comment #5 from David Edelsohn  ---
Author: dje
Date: Thu Dec  7 20:05:59 2017
New Revision: 255483

URL: https://gcc.gnu.org/viewcvs?rev=255483&root=gcc&view=rev
Log:
PR libstdc++/83120
* testsuite/ext/special_functions/hyperg/check_value.cc: Add
-ffp-contract=off. Add -ffloat-store for m68* and ia32.
*
testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/check_value.cc:
Same.


Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/ext/special_functions/hyperg/check_value.cc
   
trunk/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/check_value.cc

[Bug libstdc++/83120] [8 Regression] ext/special_functions/hyperg failure on AIX

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

David Edelsohn  changed:

   What|Removed |Added

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

--- Comment #6 from David Edelsohn  ---
Fixed.

[Bug fortran/83316] New: ICE: minval/maxval and characters

2017-12-07 Thread physiker at toast2 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83316

Bug ID: 83316
   Summary: ICE: minval/maxval and characters
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: physiker at toast2 dot net
  Target Milestone: ---

Compiling the source file a.f90 causes an internal compiler error. I believe
the code is legal. 

program tminmaxval
  implicit none

  character(len=*), parameter :: b = "a"
  character(len=*), parameter :: e = "c"
  character(len=*), parameter :: s(3) = (/"a", "b", "c"/)

  if (minval(s) /= b) then
 write(*,*) "minval(s) =", minval(s)
  end if

  if (maxval(s) /= e) then
 write(*,*) "maxval(s) =", maxval(s)
  end if

end program tminmaxval

LANG=C gfortran-8 -W -Wall a.f90 -v 
Driving: gfortran-8 -W -Wall a.f90 -v -mmacosx-version-min=10.11.0
-asm_macosx_version_min=10.11 -l gfortran -shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran-8
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin15.6.0/8.0.0/lto-wrapper
Target: x86_64-apple-darwin15.6.0
Configured with: ../gcc/configure --enable-languages=c,c++,fortran,lto
--with-gmp=/sw --with-libiconv-prefix=/sw --with-isl=/sw --with-mpc=/sw
--with-system-zlib --program-suffix=-8
Thread model: posix
gcc version 8.0.0 20171203 (experimental) [trunk revision 255368] (GCC) 
COLLECT_GCC_OPTIONS='-Wextra' '-Wall' '-v' '-mmacosx-version-min=10.11.0'
'-asm_macosx_version_min=10.11' '-shared-libgcc' '-mtune=core2'
 /usr/local/libexec/gcc/x86_64-apple-darwin15.6.0/8.0.0/f951 a.f90 -fPIC -quiet
-dumpbase a.f90 -mmacosx-version-min=10.11.0 -mtune=core2 -auxbase a -Wextra
-Wall -version -fintrinsic-modules-path
/usr/local/lib/gcc/x86_64-apple-darwin15.6.0/8.0.0/finclude -o
/var/folders/97/4qnhjhtn25s86s9hkz0h37_mgn/T//ccL7uiWM.s
GNU Fortran (GCC) version 8.0.0 20171203 (experimental) [trunk revision 255368]
(x86_64-apple-darwin15.6.0)
compiled by GNU C version 8.0.0 20171203 (experimental) [trunk revision
255368], GMP version 6.1.2, MPFR version 3.1.6, MPC version 1.0.3, isl version
isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU Fortran2008 (GCC) version 8.0.0 20171203 (experimental) [trunk revision
255368] (x86_64-apple-darwin15.6.0)
compiled by GNU C version 8.0.0 20171203 (experimental) [trunk revision
255368], GMP version 6.1.2, MPFR version 3.1.6, MPC version 1.0.3, isl version
isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
f951: internal compiler error: gfc_convert_constant(): Unexpected type
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

[Bug c/81568] attribute always_inline honored even after attribute noinline

2017-12-07 Thread dave.pagan at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81568

Dave Pagan  changed:

   What|Removed |Added

 CC||dave.pagan at oracle dot com

--- Comment #2 from Dave Pagan  ---
Martin, have you (or has anyone else) spent time on this, or have a fix
already? I was thinking about looking into it further but don't want to
duplicate effort.

[Bug c/81568] attribute always_inline honored even after attribute noinline

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

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org
  Known to fail||5.4.0, 6.4.0, 7.2.0

--- Comment #3 from Martin Sebor  ---
Thanks for the ping!  I just committed a fix for pr81544 (and pr81566) that
makes attribute validation more consistent.  With the patch applied, the output
for the test case in comment #0 is as follows.  There's just one warning and no
error because (as the warning says) the conflicting attribute is dropped.

I think with that this bug can be resolved as fixed as well (I forgot about it
and so didn't mention it in the commit).  Let me go ahead and do that, but
please feel free to take the freshly committed patch for a spin and open new
bugs if/when you find them or if you have suggestions for further refinements
or enhancements in this area.

$ cat z.c && gcc -O2 -S -Wall -Wextra -Wpedantic z.c
int __attribute__ ((noinline)) f (int);
int __attribute__ ((always_inline)) f (int);

int f (int i) { return i > 1 ? i * f (i - 1) * f (i - 2) : i > 0 ? i * f (i -
1) : 1; }

int f1 (void)
{
  return f (123);
}
z.c:2:1: warning: ignoring attribute ‘always_inline’ because it conflicts with
attribute ‘noinline’ [-Wattributes]
 int __attribute__ ((always_inline)) f (int);
 ^~~
z.c:1:32: note: previous declaration here
 int __attribute__ ((noinline)) f (int);
^

[Bug c/81568] attribute always_inline honored even after attribute noinline

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

Martin Sebor  changed:

   What|Removed |Added

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

--- Comment #4 from Martin Sebor  ---
Fixed in r255469.

[Bug rtl-optimization/83317] New: ICE in lra_eliminate_reg_if_possible compiling Python with -mfpmath=sse on x86 Linux, possible 7 regression

2017-12-07 Thread makosoft at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83317

Bug ID: 83317
   Summary: ICE in lra_eliminate_reg_if_possible compiling Python
with -mfpmath=sse on x86 Linux, possible 7 regression
   Product: gcc
   Version: 7.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: makosoft at gmail dot com
  Target Milestone: ---

When compiling Python 3.5.4 or 3.6.3 with -mfpmath=sse on x86 Linux using gcc
7.2.0, I get an ICE/segfault in lra_eliminate_reg_if_possible while compiling
cmathmodule.c:

building 'cmath' extension
gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3
-Wall -Wstrict-prototypes -O2 -march=native 
-pipe -fomit-frame-pointer -mfpmath=sse -O2 -march=native -pipe
-fomit-frame-pointer -mfpmath=sse 
-Werror=declaration-after-statement -I./Include -I.
-I/home/aidan/src/Python-3.5.4/Include 
-I/home/aidan/src/Python-3.5.4 -c
/home/aidan/src/Python-3.5.4/Modules/cmathmodule.c -o 
build/temp.linux-i686-3.5/home/aidan/src/Python-3.5.4/Modules/cmathmodule.o
In file included from /home/aidan/src/Python-3.5.4/Modules/cmathmodule.c:11:0:
/home/aidan/src/Python-3.5.4/Modules/clinic/cmathmodule.c.h: In function
‘cmath_acos’:
/home/aidan/src/Python-3.5.4/Modules/clinic/cmathmodule.c.h:44:1: internal
compiler error: Segmentation fault
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.

C-Reduce produced the following reduced test case which triggers the same
ICE/segfault:

typedef struct {
  double a
} b;
b c;
d, e;
f() {
  _setjmp();
  b g;
  if (d)
g.a = copysign(e, d);
  c = g;
}

A suitable set of compile options to reproduce this using the above test case
is:

gcc -fPIC -O1 -march=prescott -mfpmath=sse -c cmathmodule-reduced.i

The ICE does not appear to occur with gcc 6.4.0, nor does it occur if either of
-mfpmath=sse or -fPIC are disabled. It is, however, still present in the gcc 7
branch as of at least r255440. Backtrace is as follows:

Program received signal SIGSEGV, Segmentation fault.
0x084cb7f4 in lra_eliminate_reg_if_possible (loc=0xb772ad38) at
../.././gcc/lra-eliminations.c:1385
1385  || ! TEST_HARD_REG_BIT (lra_no_alloc_regs, regno))
(gdb) bt
#0  0x084cb7f4 in lra_eliminate_reg_if_possible (loc=0xb772ad38) at
../.././gcc/lra-eliminations.c:1385
#1  0x084bc1f0 in (anonymous namespace)::address_eliminator::address_eliminator
(this=0xbfffdb90, ad=)
at ../.././gcc/lra-constraints.c:362
#2  0x084bc320 in satisfies_memory_constraint_p (op=op@entry=0xb772ad40,
constraint=CONSTRAINT_m)
at ../.././gcc/lra-constraints.c:401
#3  0x084c2b3a in process_alt_operands (only_alternative=) at
../.././gcc/lra-constraints.c:2252
#4  curr_insn_transform (check_only_p=check_only_p@entry=false) at
../.././gcc/lra-constraints.c:3848
#5  0x084c5880 in lra_constraints (first_p=false) at
../.././gcc/lra-constraints.c:4863
#6  0x084b620e in lra (f=0x0) at ../.././gcc/lra.c:2392
#7  0x08477648 in do_reload () at ../.././gcc/ira.c:5478
#8  (anonymous namespace)::pass_reload::execute (this=0x96ec4d0) at
../.././gcc/ira.c:5662
#9  0x0853a145 in execute_one_pass (pass=0x96ec4d0) at
../.././gcc/passes.c:2465
#10 0x0853a94f in execute_pass_list_1 (pass=0x96ec4d0) at
../.././gcc/passes.c:2554
#11 0x0853a962 in execute_pass_list_1 (pass=0x96eb950, pass@entry=0x96e9280) at
../.././gcc/passes.c:2555
#12 0x0853a9a9 in execute_pass_list (fn=0xb772, pass=0x96e9280) at
../.././gcc/passes.c:2565
#13 0x082c18cc in cgraph_node::expand (this=0xb7726000) at
../.././gcc/cgraphunit.c:2042
#14 0x082c2c08 in expand_all_functions () at ../.././gcc/cgraphunit.c:2178
#15 symbol_table::compile (this=this@entry=0xb76680c4) at
../.././gcc/cgraphunit.c:2535
#16 0x082c48e9 in symbol_table::compile (this=0xb76680c4) at
../.././gcc/cgraphunit.c:2595
#17 symbol_table::finalize_compilation_unit (this=0xb76680c4) at
../.././gcc/cgraphunit.c:2625
#18 0x085f417a in compile_file () at ../.././gcc/toplev.c:492
#19 0x081a14e3 in do_compile () at ../.././gcc/toplev.c:2003
#20 toplev::main (this=0xbfffe8fe, argc=, argv=)
at ../.././gcc/toplev.c:2138
#21 0x081a3741 in main (argc=10, argv=0xbfffe9c4) at ../.././gcc/main.c:39

[Bug c/81568] attribute always_inline honored even after attribute noinline

2017-12-07 Thread dave.pagan at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81568

--- Comment #5 from Dave Pagan  ---
Thanks for the update, Martin.

[Bug fortran/83318] New: Illegal program causes internal compiler error with tags gfc_trans_allocate, at fortran/trans-stmt.c:5646 and Aborted (program f951)

2017-12-07 Thread dmh at ucar dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83318

Bug ID: 83318
   Summary: Illegal program causes internal compiler error with
tags gfc_trans_allocate, at fortran/trans-stmt.c:5646
and  Aborted (program f951)
   Product: gcc
   Version: 5.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dmh at ucar dot edu
  Target Milestone: ---

Created attachment 42812
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42812&action=edit
Stackdump from gfortran crash

the exact version of GCC: 5.4.0
the system type: cygwin 32 bit on Windows 7
the options given when GCC was configured/built: unkoown
the complete command line that triggers the bug: gfortran -g -O0 -o t.exe t.f90
the compiler output (error messages, warnings, etc.)
-
t.f90:5:0:

 allocate(character(len=*) :: string_array(2))
 1
internal compiler error: in gfc_trans_allocate, at fortran/trans-stmt.c:5646

t.f90:5:0: internal compiler error: Aborted
gfortran: internal compiler error: Aborted (program f951)
--

the preprocessed file: crash apparently prevents this from being constructed.

I have attached the stackdump for what that is worth.

Failing program:
--
program fail
implicit none

character(len=:), allocatable :: string_array(:)
allocate(character(len=*) :: string_array(2))
end program fail

  1   2   >