[Bug target/88178] [9 Regression] ICE in dbx_reg_number, at dwarf2out.c:13659

2018-11-27 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88178

--- Comment #7 from Uroš Bizjak  ---
A quick smoke-test of the idea from Comment #3.

The following patch:

--cut here--
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 95abde95f89d..e126fdcb8480 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -4775,9 +4775,8 @@ ix86_conditional_register_usage (void)

   /* If MMX is disabled, squash the registers.  */
   if (! TARGET_MMX)
-for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
-  if (TEST_HARD_REG_BIT (reg_class_contents[(int)MMX_REGS], i))
-   fixed_regs[i] = call_used_regs[i] = 1, reg_names[i] = "";
+AND_COMPL_HARD_REG_SET (accessible_reg_set,
+   reg_class_contents[(int) MMX_REGS]);

   /* If SSE is disabled, squash the registers.  */
   if (! TARGET_SSE)
--cut here--

and the following testcase

void foo (int i)
{
  register int c __asm__ ("mm0") = i;
  asm volatile ("%0" : : "y"(c) : "mm1");
}

generate following warning (-mno-mmx):

mm.c: In function ‘foo’:
mm.c:3:16: error: the register specified for ‘c’ cannot be accessed by the
current target

where without the patch:

mm.c: In function ‘foo’:
mm.c:3:16: error: invalid register name for ‘c’
mm.c:4:3: error: unknown register name ‘mm1’ in ‘asm’

IMO, the new error is better, but something should be done to detect invalid
clobber name.

[Bug target/65146] alignment of _Atomic structure member is not correct

2018-11-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65146

--- Comment #11 from Jonathan Wakely  ---
(In reply to Jonathan Wakely from comment #9)
> Did this ever get taken to the ABI group?

I've done so now.

[Bug lto/88140] [9 Regression] ICE: verify_gimple failed since r266325

2018-11-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88140

Richard Biener  changed:

   What|Removed |Added

 CC||jsm28 at gcc dot gnu.org

--- Comment #4 from Richard Biener  ---
Hmm, no.  But somehow re-building the array type yields TYPE_SIZE == NULL_TREE
rather than TYPE_SIZE == integer_zero_node.

That happens in

Old value = 
New value = 
grokdeclarator (declarator=0x3028700, declspecs=0x30285a0, decl_context=FIELD, 
initialized=false, width=0x0, decl_attrs=0x7fffd518, 
expr=0x7fffd2d0, expr_const_operands=0x7fffd2cf, 
deprecated_state=DEPRECATED_NORMAL)
at /space/rguenther/src/gcc-sccvn/gcc/c/c-decl.c:6397
6397TYPE_SIZE_UNIT (type) = size_zero_node;


/* The GCC extension for zero-length arrays differs from
   ISO flexible array members in that sizeof yields
   zero.  */
if (size && integer_zerop (size))
  {
gcc_assert (itype);
type = build_distinct_type_copy (TYPE_MAIN_VARIANT (type));
TYPE_SIZE (type) = bitsize_zero_node;
TYPE_SIZE_UNIT (type) = size_zero_node;
SET_TYPE_STRUCTURAL_EQUALITY (type);
  }

and this overrides what layout_type does.

The cleanest fix would be to add a type flag ARRAY_TYPE_ZERO_LENGTH but then
the odd thing is that adjusting the domain to be [0, -1] instead of [0, ]
would probably make layout_type do the same decision?!

For the free-lang-data regression the following is a simple fix which I am
testing now:

diff --git a/gcc/tree.c b/gcc/tree.c
index 39a92464414..a39e611292a 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -5201,6 +5201,15 @@ fld_process_array_type (tree t, tree t2, hash_map *map,
   array = build_array_type_1 (t2, TYPE_DOMAIN (t),
  TYPE_TYPELESS_STORAGE (t), false);
   TYPE_CANONICAL (array) = TYPE_CANONICAL (t);
+  /* Re-building the array via build_array_type_1 causes the C FE
+ special-handling of zero-length arrays to be dropped.  So
+we copy back TYPE_SIZE[_UNIT] from the original type here
+if layout_type decided the type is incomplete.  */
+  if (!TYPE_SIZE (array))
+   {
+ TYPE_SIZE (array) = TYPE_SIZE (t);
+ TYPE_SIZE_UNIT (array) = TYPE_SIZE_UNIT (t);
+   }
   add_tree_to_fld_list (array, fld);
 }
   return array;

[Bug target/88195] misleading error message for unsupported builtin

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88195

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug c++/86900] [8 Regression] -gdwarf-5 -O2 -ffunction-sections = assembler error

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86900

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[8/9 Regression] -gdwarf-5  |[8 Regression] -gdwarf-5
   |-O2 -ffunction-sections =   |-O2 -ffunction-sections =
   |assembler error |assembler error

--- Comment #6 from Jakub Jelinek  ---
Fixed on the trunk so far.

[Bug testsuite/88090] [9 regression] obj-c++.dg/attributes/method-nonnull-1.mm FAILs

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88090

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug c/88214] New: ICE in bitmap_intersect_p() on 32-bit BE platforms

2018-11-27 Thread slyfox at inbox dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88214

Bug ID: 88214
   Summary: ICE in bitmap_intersect_p() on 32-bit BE platforms
   Product: gcc
   Version: 7.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: slyfox at inbox dot ru
  Target Milestone: ---

Note: this ICE happens on 32-bit BE-hosts and does not happen on i686 host or
x86_64 host.

Originally reported at:
https://bugs.gentoo.org/672032

Minimal reproducer:

  $ cat nc.c
  void i();
  short a;
  void b(e) char * e;
  {
i();
b(a);
  }


  $ LANG=C sparc-unknown-linux-gnu-gcc-7.3.0 -Wall -O2 -pipe -o nc.o -c nc.c
  nc.c: In function 'b':
  nc.c:7:1: internal compiler error: Segmentation fault

  $ LANG=C powerpc-unknown-linux-gnu-gcc -Wall -O2 -pipe -o nc.o -c nc.c
  nc.c: In function 'b':
  nc.c:7:1: internal compiler error: Segmentation fault

Note: it seems to be triggered by K&R-style function declarations.

Short backtrace from powerpc-unknown-linux-gnu-gcc-7.3.0:

$ gdb --args /usr/libexec/gcc/powerpc-unknown-linux-gnu/7.3.0/cc1 -quiet -v
-D__unix__ -D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux -D__linux
-Asystem=linux -Asystem=unix -Asystem=posix nc.c -msecure-plt -quiet -dumpbase
nc.c -auxbase-strip nc.o -O2 -Wall -version -o /tmp/ccYGzVuI.s

Program received signal SIGSEGV, Segmentation fault.
0x1020a4ec in bitmap_intersect_p(bitmap_head const*, bitmap_head const*) ()
(gdb) bt
#0  0x1020a4ec in bitmap_intersect_p(bitmap_head const*, bitmap_head const*) ()
#1  0x107ed1ec in pt_solutions_intersect(pt_solution*, pt_solution*) ()
#2  0x10726524 in call_may_clobber_ref_p_1(gcall*, ao_ref*) ()
#3  0x10726bf0 in stmt_may_clobber_ref_p_1(gimple*, ao_ref*) ()
#4  0x1046c2e4 in ?? ()
#5  0x10471a50 in ?? ()
#6  0x10472878 in analysis_dom_walker::before_dom_children(basic_block_def*) ()
#7  0x10c00160 in dom_walker::walk(basic_block_def*) ()
#8  0x104708f8 in ipa_analyze_node(cgraph_node*) ()
#9  0x10c52378 in ?? ()
#10 0x1056a14c in execute_ipa_summary_passes(ipa_opt_pass_d*) ()
#11 0x10278a20 in ?? ()
#12 0x1027a9f0 in symbol_table::finalize_compilation_unit() ()
#13 0x10648bd8 in ?? ()
#14 0x1011dfd4 in toplev::main(int, char**) ()
#15 0x1011f570 in main ()

[Bug sanitizer/88215] New: UBSAN: Internal compiler error with attribute(unused)

2018-11-27 Thread orgads at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88215

Bug ID: 88215
   Summary: UBSAN: Internal compiler error with attribute(unused)
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: sanitizer
  Assignee: unassigned at gcc dot gnu.org
  Reporter: orgads at gmail dot com
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at 
gcc dot gnu.org
  Target Milestone: ---

> cat err.cpp

void foo()
{
unsigned a = 2, __attribute__ ((unused)) b = 1;
unsigned f = a/b;
}

> g++ -fsanitize=undefined -w -O0 -c err.cpp

err.cpp: In function 'void foo()':
err.cpp:4:20: internal compiler error: in ubsan_instrument_division, at
c-family/c-ubsan.c:48
 unsigned f = a/b;

It doesn't happen if the variable is declared separately:

unsigned __attribute__ ((unused)) b = 1;

or

__attribute__ ((unused)) unsigned b = 1;

Looks similar to bug 80348.

[Bug c++/88216] New: ICE (-std=c++2a) in cxx_eval_constant_expression, at cp/constexpr.c:4602

2018-11-27 Thread emmanuel.le-tr...@cnrs-orleans.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88216

Bug ID: 88216
   Summary: ICE (-std=c++2a) in cxx_eval_constant_expression, at
cp/constexpr.c:4602
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: emmanuel.le-tr...@cnrs-orleans.fr
  Target Milestone: ---

$ g++-9 -v  
Using built-in specs.
COLLECT_GCC=g++-9
COLLECT_LTO_WRAPPER=/home/manu/system/opt/gcc-9/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-9/configure --prefix=/home/manu/system/opt/gcc-9
--program-suffix=-9
Thread model: posix
gcc version 9.0.0 20181123 (experimental) (GCC) 

$ cat bug.cpp   
struct 
T {};

template 
struct 
U {};

template 
int
f (U );


$ g++-9 -std=c++2a -Wall -Wextra -c bug.cpp 
bug.cpp:10:8: internal compiler error: in cxx_eval_constant_expression, at
cp/constexpr.c:4602
   10 | f (U );
  |^
0x5ee04a cxx_eval_constant_expression
../../gcc-9/gcc/cp/constexpr.c:4602
0x8759b6 cxx_eval_call_expression
../../gcc-9/gcc/cp/constexpr.c:1511
0x877af8 cxx_eval_constant_expression
../../gcc-9/gcc/cp/constexpr.c:4296
0x87cf3e cxx_eval_outermost_constant_expr
../../gcc-9/gcc/cp/constexpr.c:5032
0x9a9f03 get_template_parm_object
../../gcc-9/gcc/cp/pt.c:6665
0x9a9f03 convert_nontype_argument
../../gcc-9/gcc/cp/pt.c:7126
0x9a9f03 convert_template_argument
../../gcc-9/gcc/cp/pt.c:8033
0x9a9f03 convert_template_argument
../../gcc-9/gcc/cp/pt.c:7784
0x995793 coerce_template_parms
../../gcc-9/gcc/cp/pt.c:8509
0x9a115e lookup_template_class_1
../../gcc-9/gcc/cp/pt.c:9325
0x9a115e lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
../../gcc-9/gcc/cp/pt.c:9684
0x9d29db finish_template_type(tree_node*, tree_node*, int)
../../gcc-9/gcc/cp/semantics.c:3247
0x950295 cp_parser_template_id
../../gcc-9/gcc/cp/parser.c:16295
0x950406 cp_parser_class_name
../../gcc-9/gcc/cp/parser.c:22858
0x95376b cp_parser_qualifying_entity
../../gcc-9/gcc/cp/parser.c:6644
0x95376b cp_parser_nested_name_specifier_opt
../../gcc-9/gcc/cp/parser.c:6330
0x950b78 cp_parser_simple_type_specifier
../../gcc-9/gcc/cp/parser.c:17634
0x947be5 cp_parser_type_specifier
../../gcc-9/gcc/cp/parser.c:17307
0x948a8e cp_parser_decl_specifier_seq
../../gcc-9/gcc/cp/parser.c:13961
0x9618b0 cp_parser_parameter_declaration
../../gcc-9/gcc/cp/parser.c:21973
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug target/52795] FAIL: gcc.dg/tree-prof/pr34999.c compilation, -fprofile-use -D_PROFILE_USE on {x86_64,i386}-apple-darwin{10,11} at -m64

2018-11-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52795

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #16 from Martin Liška  ---
Let's resolve that.

[Bug target/81733] stage1 libgcc_s.dylib fails to link on Darwin 11/x86_64

2018-11-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81733

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #25 from Martin Liška  ---
Then I'm closing that..

[Bug target/88189] ix86_expand_sse_movcc and blend for scalars

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88189

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-11-27
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
 Ever confirmed|0   |1

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

Untested fix.  Not going to do it in the combiner, as written above, it is too
complicated.

[Bug d/88039] gdc.test/compilable/ddoc12.d FAILs

2018-11-27 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88039

Rainer Orth  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
URL||https://gcc.gnu.org/ml/gcc-
   ||patches/2018-11/msg02172.ht
   ||ml
   Last reconfirmed||2018-11-27
   Assignee|ibuclaw at gdcproject dot org  |ro at gcc dot gnu.org
   Target Milestone|--- |9.0
 Ever confirmed|0   |1

--- Comment #7 from Rainer Orth  ---
Mine, patch posted.

[Bug c++/88203] assert does not compile with OpenMP's pragma omp parallel for default(none)

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88203

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #2 from Jakub Jelinek  ---
Note, in OpenMP 3.1 and earlier this would be actually valid:
"Variables with const-qualified type having no mutable member are shared."
and __PRETTY_FUNCTION__ etc. is const qualified (const char []).
This has changed in OpenMP 4.0, such variables are no longer predetermined
shared, so must be explicitly listed in data sharing clauses for default(none).
There is nothing wrong on the compiler side here.

[Bug target/88189] ix86_expand_sse_movcc and blend for scalars

2018-11-27 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88189

--- Comment #4 from Marc Glisse  ---
Thanks, that looks nice. I was wondering if it was better to define a scalar
version of the insn or to expand to the vector version + many subregs, but the
scalar version (your patch) matches what we already do for and/or/xor, so
that's good.

[Bug tree-optimization/88217] New: [8/9 Regression] Compile time and memory hog w/ -O2 -fstrict-enums -fno-tree-forwprop -fno-tree-fre

2018-11-27 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88217

Bug ID: 88217
   Summary: [8/9 Regression] Compile time and memory hog w/ -O2
-fstrict-enums -fno-tree-forwprop -fno-tree-fre
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Keywords: compile-time-hog, memory-hog
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-9.0.0-alpha20181125 snapshot (r266441) takes inordinate amount of time and
memory compiling gcc/testsuite/g++.dg/cpp0x/range-for17.C w/ -O2 (-O3, -Ofast)
-fstrict-enums -fno-tree-forwprop -fno-tree-fre:

% timeout 10 gcc-9.0.0-alpha20181125 -O2 -fstrict-enums -fno-tree-forwprop
-fno-tree-fre -c gcc/testsuite/g++.dg/cpp0x/range-for17.C
zsh: exit 124   timeout 10 gcc-9.0.0-alpha20181125 -O2 -fstrict-enums
-fno-tree-forwprop  -c

perf top:

Overhead  Shared Objec  Symbol
  10.15%  cc1plus   [.] compare_values_warnv
   8.78%  cc1plus   [.] operand_equal_p
   6.99%  cc1plus   [.] tree_int_cst_compare
   4.56%  cc1plus   [.] tree_int_cst_equal
   4.30%  cc1plus   [.] value_range_base::check
   3.66%  cc1plus   [.] get_single_symbol
   2.85%  cc1plus   [.] wide_int_to_tree_1
   2.57%  cc1plus   [.] operand_less_p
   2.56%  cc1plus   [.] value_range::intersect_helper
   2.39%  cc1plus   [.] wi::lts_p
>, generic_wide_int > >
   2.22%  cc1plus   [.] hash_table::find_slot_with_hash
   2.06%  cc1plus   [.] int_cst_hasher::hash
   2.03%  cc1plus   [.] int_cst_hasher::equal
   1.78%  cc1plus   [.] wi::extended_tree<192>::extended_tree
   1.45%  cc1plus   [.] fold_convert_loc
   1.37%  cc1plus   [.] vr_values::get_value_range
   1.29%  cc1plus   [.] value_range::set
   1.29%  cc1plus   [.] is_gimple_min_invariant
   1.25%  cc1plus   [.] inchash::add_expr
   1.20%  cc1plus   [.] wi::force_to_size
   1.19%  cc1plus   [.] vrp_operand_equal_p
   1.16%  cc1plus   [.] add_ssa_edge
   1.05%  cc1plus   [.] gimple_simplify
   0.94%  cc1plus   [.] vr_values::update_value_range
   0.94%  cc1plus   [.] value_range_base::set_and_canonicalize
   0.94%  cc1plus   [.] get_range_info
   0.89%  cc1plus   [.] int_const_binop
   0.89%  cc1plus   [.] tree_ssa_useless_type_conversion
   0.89%  cc1plus   [.] bitmap_set_bit
   0.82%  cc1plus   [.] ssa_propagation_engine::simulate_stmt
   0.76%  cc1plus   [.] iterative_hash_host_wide_int
   0.74%  cc1plus   [.] vrp_valueize_1
   0.73%  cc1plus   [.] get_range_info
   0.71%  cc1plus   [.] value_range::set_equiv
   0.68%  cc1plus   [.] extract_range_into_wide_ints
   0.66%  cc1plus   [.] wi::to_wide
   0.66%  cc1plus   [.] get_int_cst_ext_nunits
   0.59%  cc1plus   [.] vrp_prop::visit_stmt
   0.58%  cc1plus   [.] extract_range_from_binary_expr
   0.58%  cc1plus   [.] extract_range_from_unary_expr
   0.58%  cc1plus   [.] ssa_propagation_engine::ssa_propagate
   0.54%  cc1plus   [.] gimple_fold_stmt_to_constant_1
   0.53%  cc1plus   [.] bitmap_copy
   0.48%  cc1plus   [.] stmt_interesting_for_vrp
   0.48%  cc1plus   [.] vr_values::vrp_visit_assignment_or_call
   0.46%  cc1plus   [.] vr_values::extract_range_from_phi_node
   0.43%  cc1plus   [.] instantiate_scev_r
   0.41%  cc1plus   [.] tree_ssa_strip_useless_type_conversions
   0.41%  cc1plus   [.] value_range::check
   0.41%  cc1plus   [.] canonize
   0.41%  cc1plus   [.] bitmap_clear_bit
   0.41%  cc1plus   [.] wide_int_range_convert
   0.41%  cc1plus   [.] vrp_valueize
   0.41%  cc1plus   [.] wi::divmod_internal

[Bug tree-optimization/88214] ICE in bitmap_intersect_p() on 32-bit BE platforms

2018-11-27 Thread slyfox at inbox dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88214

--- Comment #1 from Sergei Trofimovich  ---
Also reproduced on current gcc-master. Got nicer backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x102ae880 in bitmap_intersect_p (a=0xf7b73e88, b=0x101afaf) at
../../gcc/gcc/bitmap.c:2184
2184  gcc_checking_assert (!a->tree_form && !b->tree_form);
(gdb) bt
#0  0x102ae880 in bitmap_intersect_p (a=0xf7b73e88, b=0x101afaf) at
../../gcc/gcc/bitmap.c:2184
#1  0x10b2ae68 in pt_solutions_intersect_1 (pt1=pt1@entry=0xf7a992b8,
pt2=) at ../../gcc/gcc/tree-ssa-structalias.c:6841
#2  0x10b2b0e8 in pt_solutions_intersect (pt1=pt1@entry=0xf7a992b8,
pt2=) at ../../gcc/gcc/tree-ssa-structalias.c:6849
#3  0x10a13e48 in call_may_clobber_ref_p_1 (ref=,
call=0xf7a99288) at ../../gcc/gcc/gimple.h:3425
#4  call_may_clobber_ref_p_1 (call=0xf7a99288, ref=) at
../../gcc/gcc/tree-ssa-alias.c:1953
#5  0x10a14b9c in stmt_may_clobber_ref_p_1 (tbaa_p=,
ref=0xd828, stmt=0xf7a99288) at ../../gcc/gcc/tree-ssa-alias.c:2271
#6  stmt_may_clobber_ref_p_1 (stmt=stmt@entry=0xf7a99288,
ref=ref@entry=0xd828, tbaa_p=tbaa_p@entry=true) at
../../gcc/gcc/tree-ssa-alias.c:2266
#7  0x1063ef14 in determine_locally_known_aggregate_parts
(call=call@entry=0xf7b6e730, arg=, arg@entry=0xf7b4e6e0,
arg_type=arg_type@entry=0xf7aa5480, 
jfunc=jfunc@entry=0xf7b774e8) at ../../gcc/gcc/ipa-prop.c:1631
#8  0x10645ee4 in ipa_compute_jump_functions_for_edge
(fbi=fbi@entry=0xdb3c, cs=cs@entry=0xf7b6d300) at
../../gcc/gcc/ipa-prop.c:1988
#9  0x106472b4 in ipa_compute_jump_functions_for_bb (bb=,
fbi=0xdb3c) at ../../gcc/gcc/ipa-prop.c:2016
#10 analysis_dom_walker::before_dom_children (this=,
bb=) at ../../gcc/gcc/ipa-prop.c:2534
#11 0x1118990c in dom_walker::walk (this=0xdb28, bb=0xf7b6d280) at
../../gcc/gcc/domwalk.c:405
#12 0x106433b8 in ipa_analyze_node (node=node@entry=0xf7a94798) at
../../gcc/gcc/ipa-prop.c:2604
#13 0x11214fd8 in ipcp_generate_summary () at ../../gcc/gcc/ipa-cp.c:5091
#14 0x10797984 in execute_ipa_summary_passes (ipa_pass=0x11ba4f10) at
../../gcc/gcc/passes.c:2183
#15 0x10359cb0 in ipa_passes () at ../../gcc/gcc/cgraphunit.c:2506
#16 symbol_table::compile (this=this@entry=0xf7a940d8) at
../../gcc/gcc/cgraphunit.c:2618
#17 0x1035c9c4 in symbol_table::compile (this=0xf7a940d8) at
../../gcc/gcc/cgraphunit.c:2863
#18 symbol_table::finalize_compilation_unit (this=0xf7a940d8) at
../../gcc/gcc/cgraphunit.c:2863
#19 0x108b5868 in compile_file () at ../../gcc/gcc/toplev.c:481
#20 0x101372a8 in do_compile () at ../../gcc/gcc/toplev.c:2176
#21 toplev::main (this=this@entry=0xdcb8, argc=,
argc@entry=23, argv=, argv@entry=0xdf34) at
../../gcc/gcc/toplev.c:2311
#22 0x10138a00 in main (argc=23, argv=0xdf34) at ../../gcc/gcc/main.c:39

# ./gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=./gcc/xgcc
Target: powerpc-unknown-linux-gnu
Configured with: ../gcc/configure --enable-languages=c
CC=/usr/lib/ccache/bin/gcc CXX=/usr/lib/ccache/bin/g++ CFLAGS='-O1 -ggdb'
CXXFLAGS='-O1 -ggdb'
Thread model: posix
gcc version 9.0.0 20181127 (experimental) (GCC)

[Bug sanitizer/88215] UBSAN: Internal compiler error with attribute(unused)

2018-11-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88215

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-11-27
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, Marek can yo please take a look?

[Bug c++/88218] New: Builtin for detecting that throw X will definitely cause std::terminate

2018-11-27 Thread antoshkka at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88218

Bug ID: 88218
   Summary: Builtin for detecting that throw X will definitely
cause std::terminate
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: antoshkka at gmail dot com
  Target Milestone: ---

There's a need in a builtin like
__builtin_throw_will_terminate(exception_type);

Use cases include:
* Thread cancellation: detect that throwing a struct thread_cancel{}; will
cause a std::terminate. Useful for detecting that we're in the noexcept
descructor and the thread should not be cancelled in that place.
* Stackfull coroutine cancellation: same as above. Detect that throwing a
coroutine_cancel_exception does not cross a noexcept function boundaries.
* Algorithms with ExecutionPolicy - do not report errors via exceptions if
function is running in the std::seq/std::par/std::par_unseq algorithm.
* Assertions: assert from withing a particular throwing function that it is not
used from within the noexcept function.

The builtin could be implemented by investigating the exception tables at
runtime and detecting that throwing the exception will hit the std::terminate
case.

[Bug lto/88140] [9 Regression] ICE: verify_gimple failed since r266325

2018-11-27 Thread hubicka at ucw dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88140

--- Comment #5 from Jan Hubicka  ---
> diff --git a/gcc/tree.c b/gcc/tree.c
> index 39a92464414..a39e611292a 100644
> --- a/gcc/tree.c
> +++ b/gcc/tree.c
> @@ -5201,6 +5201,15 @@ fld_process_array_type (tree t, tree t2, hash_map tree> *map,
>array = build_array_type_1 (t2, TYPE_DOMAIN (t),
>   TYPE_TYPELESS_STORAGE (t), false);
>TYPE_CANONICAL (array) = TYPE_CANONICAL (t);
> +  /* Re-building the array via build_array_type_1 causes the C FE
> + special-handling of zero-length arrays to be dropped.  So
> +we copy back TYPE_SIZE[_UNIT] from the original type here
> +if layout_type decided the type is incomplete.  */
> +  if (!TYPE_SIZE (array))
> +   {
> + TYPE_SIZE (array) = TYPE_SIZE (t);
> + TYPE_SIZE_UNIT (array) = TYPE_SIZE_UNIT (t);

Makes sense to me, here.
To get types merged, we want to build same array when structure was
originally complete or incomplete. That means we should not copy real
size of the element because it is unknown in the incomplete case.

Honza
> +   }
>add_tree_to_fld_list (array, fld);
>  }
>return array;
> 
> -- 
> You are receiving this mail because:
> You are the assignee for the bug.

[Bug pch/88219] New: Precompiled headers Segmentation fault in Cygwin

2018-11-27 Thread EngyCZ at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88219

Bug ID: 88219
   Summary: Precompiled headers Segmentation fault in Cygwin
   Product: gcc
   Version: 7.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: pch
  Assignee: unassigned at gcc dot gnu.org
  Reporter: EngyCZ at gmail dot com
  Target Milestone: ---

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

Hi,
 Precompiled headers feature doesn't work in Cygwin. Compilation terminates
with Segmentation fault in cc1. Sample file attached. Same file is working in
Linux

I searched why and found that the result here
https://github.com/gcc-mirror/gcc/blob/gcc-7_3_0-release/gcc/ggc-common.c#L626
is 1 in Linux and -1 in CygWin.

GCC had to relocate PCH but it fails in fatal_error function call on line 629.

Cygwin behavior can be "emulated" by commenting out "if (result < 0)" on line
628
With this the Linux version also fails with Segmentation fault.

Thread 1 "cc1" received signal SIGSEGV, Segmentation fault.
linemap_macro_map_lookup (line=480, set=0xffbdda40) at
../../gcc-7.3.0/libcpp/line-map.c:1021
1021  if (line >= MAP_START_LOCATION (cached))
(gdb) backtrace
#0  linemap_macro_map_lookup (line=480, set=0xffbdda40) at
../../gcc-7.3.0/libcpp/line-map.c:1021
#1  linemap_lookup (set=set@entry=0xffbdda40, line=,
line@entry=480) at ../../gcc-7.3.0/libcpp/line-map.c:946
#2  0x00f5467b in linemap_macro_loc_to_def_point (original_map=,
location=480, set=) at ../../gcc-7.3.0/libcpp/line-map.c:1450
#3  linemap_resolve_location (set=0xffbdda40, loc=loc@entry=480,
lrk=lrk@entry=LRK_MACRO_DEFINITION_LOCATION, map=map@entry=0xd43c2ac) at
../../gcc-7.3.0/libcpp/line-map.c:1582
#4  0x00f2f411 in diagnostic_report_current_module
(context=context@entry=0x182fec0 , where=480) at
../../gcc-7.3.0/gcc/diagnostic.c:551
#5  0x008a406a in diagnostic_report_current_function
(context=context@entry=0x182fec0 ,
diagnostic=diagnostic@entry=0xd43c3ec) at
../../gcc-7.3.0/gcc/tree-diagnostic.c:39
#6  0x008a40c9 in default_tree_diagnostic_starter (context=0x182fec0
, diagnostic=0xd43c3ec) at
../../gcc-7.3.0/gcc/tree-diagnostic.c:48
#7  0x00f3017d in diagnostic_report_diagnostic (context=,
diagnostic=, diagnostic@entry=0xd43c3ec) at
../../gcc-7.3.0/gcc/diagnostic.c:962
#8  0x00f306af in diagnostic_impl (richloc=richloc@entry=0xd43c444,
opt=opt@entry=-1, gmsgid=gmsgid@entry=0x11223ba <(anonymous
namespace)::pass_data_rtl_pre+122> "had to relocate PCH",
ap=ap@entry=0xd43c440, kind=kind@entry=DK_FATAL)
at ../../gcc-7.3.0/gcc/diagnostic.c:1084
#9  0x00f30f6d in fatal_error (loc=480, gmsgid=gmsgid@entry=0x11223ba
<(anonymous namespace)::pass_data_rtl_pre+122> "had to relocate PCH") at
../../gcc-7.3.0/gcc/diagnostic.c:1379
#10 0x006382ad in gt_pch_restore (f=f@entry=0x20052d80) at
../../gcc-7.3.0/gcc/ggc-common.c:629
#11 0x004a9104 in c_common_read_pch (pfile=0x2007dfe0, name=0x20109128
"largefile.h.gch", fd=4, orig_name=0x20109110 "largefile.h") at
../../gcc-7.3.0/gcc/c-family/c-pch.c:368
#12 0x00f4c86f in should_stack_file (loc=40964908, import=false,
file=0x20109300, pfile=0x2007dfe0) at ../../gcc-7.3.0/libcpp/files.c:814
#13 _cpp_stack_file (pfile=0x2007dfe0, file=0x20109300, import=false,
loc=40964908) at ../../gcc-7.3.0/libcpp/files.c:900
#14 0x00f4cd71 in _cpp_stack_include (pfile=pfile@entry=0x2007dfe0,
fname=fname@entry=0x201090a8 "largefile.h", angle_brackets=0,
type=type@entry=IT_INCLUDE, loc=40964908) at
../../gcc-7.3.0/libcpp/files.c:1049
#15 0x00f41f80 in do_include_common (pfile=0x2007dfe0, type=IT_INCLUDE) at
../../gcc-7.3.0/libcpp/directives.c:858
#16 0x00f429bd in _cpp_handle_directive (pfile=pfile@entry=0x2007dfe0,
indented=0) at ../../gcc-7.3.0/libcpp/directives.c:547
#17 0x00f530b5 in _cpp_lex_token (pfile=pfile@entry=0x2007dfe0) at
../../gcc-7.3.0/libcpp/lex.c:2566
#18 0x00f5888d in cpp_get_token_1 (pfile=pfile@entry=0x2007dfe0,
location=location@entry=0xd43c8a8) at ../../gcc-7.3.0/libcpp/macro.c:2462
#19 0x00f58d5d in cpp_get_token_with_location (pfile=0x2007dfe0,
loc=loc@entry=0xd43c8a8) at ../../gcc-7.3.0/libcpp/macro.c:2648
#20 0x004a2805 in c_lex_with_flags (value=value@entry=0xd43c8ac,
loc=loc@entry=0xd43c8a8, cpp_flags=cpp_flags@entry=0xd43c8b0 "", lex_flags=0)
at ../../gcc-7.3.0/gcc/c-family/c-lex.c:398
#21 0x00437790 in c_lex_one_token (parser=parser@entry=0xd43c8a0,
token=token@entry=0xd43c8a4) at ../../gcc-7.3.0/gcc/c/c-parser.c:248
#22 0x0045da0d in c_parser_peek_token (parser=0xd43c8a0) at
../../gcc-7.3.0/gcc/c/c-parser.c:435
#23 c_parse_file () at ../../gcc-7.3.0/gcc/c/c-parser.c:18171
#24 0x004a85fd in c_common_parse_file () at
../../gcc-7.3.0/gcc/c-family/c-opts.c:1107
#25 0x00865442 in compile_file () at ../../gcc-7.3.0/gcc/toplev.c:467
#26 0x01094f94 in do_compile () at ../../gcc-7.3.0/gcc/toplev.c:2003
#27 toplev::main (this=this@entry=0xd43c9fe, argc=,
argc@entry=33, argv=, argv@entry=

[Bug lto/87988] [9 regression] Streaming of ABSTRACT_ORIGIN is expensive

2018-11-27 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87988

--- Comment #7 from Jan Hubicka  ---
Hi,
ltrans files are 1374K without and 1339K with patch.

WPA report without patch:
[WPA] read 13690507 SCCs of average size 1.397311
[WPA] 19129895 tree bodies read in total
[WPA] tree SCC table: size 4194301, 2847668 elements, collision ratio: 0.834030
[WPA] tree SCC max chain length 156 (size 1)
[WPA] Compared 5298938 SCCs, 3633923 collisions (0.685783)
[WPA] Merged 5282405 SCCs
[WPA] Merged 9857161 tree bodies
[WPA] Merged 3063763 types
[WPA] 1614359 types prevailed (2464626 associated trees)
[WPA] GIMPLE canonical type table: size 32749, 22785 elements, 149648 searches,
63491 collisions (ratio: 0.424269)
[WPA] GIMPLE canonical type pointer-map: 22785 elements, 348123 searches
[WPA] # of input files: 2236
WPA] Compression: 298531604 input bytes, 898586109 uncompressed bytes (ratio:
3.010020)
[WPA] Size of mmap'd section decls: 298531604 bytes

WPA report with patch:
WPA] read 13139926 SCCs of average size 1.412202
[WPA] 18556224 tree bodies read in total
[WPA] tree SCC table: size 4194301, 2725601 elements, collision ratio: 0.813527
[WPA] tree SCC max chain length 153 (size 1)
[WPA] Compared 5043033 SCCs, 3379920 collisions (0.670216)
[WPA] Merged 5027945 SCCs
[WPA] Merged 9584037 tree bodies
[WPA] Merged 2957501 types
[WPA] 1557131 types prevailed (2402973 associated trees)
[WPA] GIMPLE canonical type table: size 32749, 22783 elements, 148468 searches,
63408 collisions (ratio: 0.427082)
[WPA] GIMPLE canonical type pointer-map: 22783 elements, 347231 searches
[WPA] Compression: 288287953 input bytes, 867825506 uncompressed bytes (ratio:
3.010273)
[WPA] Size of mmap'd section decls: 288287953 bytes


The WPA report after optimization without patch:
WPA statistics
[WPA] read 13690507 SCCs of average size 1.397311
[WPA] 19129895 tree bodies read in total
[WPA] # of input files: 2236
[WPA] # of input cgraph nodes: 411683
[WPA] # of function bodies: 83824
[WPA] # of output files: 128
[WPA] # of output symtab nodes: 1050843
[WPA] # of output tree pickle references: 708465
[WPA] # of output tree bodies: 190996
[WPA] # callgraph partitions: 128
[WPA] Compression: 416611153 input bytes, 1228624058 uncompressed bytes (ratio:
2.949090)
[WPA] Size of mmap'd section decls: 298531604 bytes
[WPA] Size of mmap'd section function_body: 72959123 bytes

with patch:
WPA statistics
[WPA] read 13139926 SCCs of average size 1.412202
[WPA] 18556224 tree bodies read in total
[WPA] # of input files: 2236
[WPA] # of input cgraph nodes: 411683
[WPA] # of function bodies: 83824
[WPA] # of output files: 128
[WPA] # of output symtab nodes: 1050843
[WPA] # of output tree pickle references: 685935
[WPA] # of output tree bodies: 183785
[WPA] # callgraph partitions: 128
[WPA] Compression: 404728108 input bytes, 1193421138 uncompressed bytes (ratio:
2.948699)
[WPA] Size of mmap'd section decls: 288287953 bytes
[WPA] Size of mmap'd section function_body: 71319730 bytes

[Bug lto/88220] New: lto1: fatal error: Cgraph edge statement index out of range

2018-11-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88220

Bug ID: 88220
   Summary: lto1: fatal error: Cgraph edge statement index out of
range
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

It's very old issue, isolated from libfakechroot package:

$ cat open64.i
void a() __asm__("open64");

void b();
void c();

void a() {
  b();
  c();
}
extern __inline __attribute__((__gnu_inline__))
void open64() {}

struct {
  void (*d) (void);
} e = {open64};

$ gcc -flto open64.i -shared -fPIC -O
In function ‘a’:
lto1: fatal error: Cgraph edge statement index out of range
compilation terminated.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

And one very similar test-case:

$ cat open64-2.i 
void a() __asm__("open64");

void b();
void c();

void a() {
  b();
  c();
}
extern __inline __attribute__((__gnu_inline__)) int open64() {}
struct {
  int (*d) (void);
} e = {open64};

$ gcc -flto open64-2.i -shared -fPIC -O
lto1: internal compiler error: in wide_int_to_tree_1, at tree.c:1561
0x6bed2b wide_int_to_tree_1
/home/marxin/Programming/gcc/gcc/tree.c:1561
0xabebaf lto_input_tree_1(lto_input_block*, data_in*, LTO_tags, unsigned int)
/home/marxin/Programming/gcc/gcc/lto-streamer-in.c:1517
0xabebaf lto_input_tree_1(lto_input_block*, data_in*, LTO_tags, unsigned int)
/home/marxin/Programming/gcc/gcc/lto-streamer-in.c:1483
0xabed60 lto_input_scc(lto_input_block*, data_in*, unsigned int*, unsigned
int*)
/home/marxin/Programming/gcc/gcc/lto-streamer-in.c:1438
0xabedcc lto_input_tree(lto_input_block*, data_in*)
/home/marxin/Programming/gcc/gcc/lto-streamer-in.c:1541
0xac0e23 input_function
/home/marxin/Programming/gcc/gcc/lto-streamer-in.c:1043
0xac0e23 lto_read_body_or_constructor
/home/marxin/Programming/gcc/gcc/lto-streamer-in.c:1295
0x819854 cgraph_node::get_untransformed_body()
/home/marxin/Programming/gcc/gcc/cgraph.c:3545
0x825939 cgraph_node::expand()
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2166
0x8269d3 expand_all_functions
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2334
0x8269d3 symbol_table::compile()
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2685
0x78e219 lto_main()
/home/marxin/Programming/gcc/gcc/lto/lto.c:3389

[Bug lto/88220] lto1: fatal error: Cgraph edge statement index out of range

2018-11-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88220

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |hubicka at gcc dot 
gnu.org
 Ever confirmed|0   |1

[Bug c++/88218] Builtin for detecting that throw X will definitely cause std::terminate

2018-11-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88218

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-11-27
 Ever confirmed|0   |1
   Severity|normal  |enhancement

[Bug ada/88200] [9 Regression] ada bootstrap failure on alpha-linux-gnu (aised STORAGE_ERROR : stack overflow or erroneous memory access)

2018-11-27 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88200

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2018-11-27
 CC||ebotcazou at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Eric Botcazou  ---
I cannot reproduce with a cross.  Can you attach the auto-host file?

[Bug sanitizer/88215] UBSAN: Internal compiler error with attribute(unused)

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88215

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #2 from Jakub Jelinek  ---
Created attachment 45100
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45100&action=edit
gcc9-pr88215.patch

Untested fix.  build_type_attribute_qual_variant creates distinct type copies,
which don't have the same main variant, just are compatible types.

[Bug c++/88221] New: Only restricted set of balanced token sequences allowed for attributes

2018-11-27 Thread o_kniemeyer at maxon dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88221

Bug ID: 88221
   Summary: Only restricted set of balanced token sequences
allowed for attributes
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: o_kniemeyer at maxon dot net
  Target Milestone: ---

Attribute arguments may be arbitrary token sequences as long as they are
balanced regarding () [] {}. From C++17 10.6.1:

attribute-argument-clause :
( balanced-token-seq opt )

balanced-token-seq :
balanced-token
balanced-token-seq balanced-token

balanced-token :
( balanced-token-seqopt )
[ balanced-token-seqopt ]
{ balanced-token-seqopt }
any token other than a parenthesis, a bracket, or a brace

However GCC only allows a quite restricted set. For example the following
arguments are rejected:

[[myattribute(a)]] void Func();
[[myattribute(void)]] void Func();
[[myattribute(1 2)]] void Func();
[[myattribute(1:2)]] void Func();
[[myattribute([1])]] void Func();

[Bug c++/88221] Only restricted set of balanced token sequences allowed for attributes

2018-11-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88221

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-11-27
 Ever confirmed|0   |1

[Bug lto/87988] [9 regression] Streaming of ABSTRACT_ORIGIN is expensive

2018-11-27 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87988

--- Comment #8 from rguenther at suse dot de  ---
On November 27, 2018 12:01:03 PM GMT+01:00, "hubicka at gcc dot gnu.org"
 wrote:
>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87988
>
>--- Comment #7 from Jan Hubicka  ---
>Hi,
>ltrans files are 1374K without and 1339K with patch.
>
>WPA report without patch:
>[WPA] read 13690507 SCCs of average size 1.397311
>[WPA] 19129895 tree bodies read in total
>[WPA] tree SCC table: size 4194301, 2847668 elements, collision ratio:
>0.834030
>[WPA] tree SCC max chain length 156 (size 1)
>[WPA] Compared 5298938 SCCs, 3633923 collisions (0.685783)
>[WPA] Merged 5282405 SCCs
>[WPA] Merged 9857161 tree bodies
>[WPA] Merged 3063763 types
>[WPA] 1614359 types prevailed (2464626 associated trees)
>[WPA] GIMPLE canonical type table: size 32749, 22785 elements, 149648
>searches,
>63491 collisions (ratio: 0.424269)
>[WPA] GIMPLE canonical type pointer-map: 22785 elements, 348123
>searches
>[WPA] # of input files: 2236
>WPA] Compression: 298531604 input bytes, 898586109 uncompressed bytes
>(ratio:
>3.010020)
>[WPA] Size of mmap'd section decls: 298531604 bytes
>
>WPA report with patch:
>WPA] read 13139926 SCCs of average size 1.412202
>[WPA] 18556224 tree bodies read in total
>[WPA] tree SCC table: size 4194301, 2725601 elements, collision ratio:
>0.813527
>[WPA] tree SCC max chain length 153 (size 1)
>[WPA] Compared 5043033 SCCs, 3379920 collisions (0.670216)
>[WPA] Merged 5027945 SCCs
>[WPA] Merged 9584037 tree bodies
>[WPA] Merged 2957501 types
>[WPA] 1557131 types prevailed (2402973 associated trees)
>[WPA] GIMPLE canonical type table: size 32749, 22783 elements, 148468
>searches,
>63408 collisions (ratio: 0.427082)
>[WPA] GIMPLE canonical type pointer-map: 22783 elements, 347231
>searches
>[WPA] Compression: 288287953 input bytes, 867825506 uncompressed bytes
>(ratio:
>3.010273)
>[WPA] Size of mmap'd section decls: 288287953 bytes
>
>
>The WPA report after optimization without patch:
>WPA statistics
>[WPA] read 13690507 SCCs of average size 1.397311
>[WPA] 19129895 tree bodies read in total
>[WPA] # of input files: 2236
>[WPA] # of input cgraph nodes: 411683
>[WPA] # of function bodies: 83824
>[WPA] # of output files: 128
>[WPA] # of output symtab nodes: 1050843
>[WPA] # of output tree pickle references: 708465
>[WPA] # of output tree bodies: 190996
>[WPA] # callgraph partitions: 128
>[WPA] Compression: 416611153 input bytes, 1228624058 uncompressed bytes
>(ratio:
>2.949090)
>[WPA] Size of mmap'd section decls: 298531604 bytes
>[WPA] Size of mmap'd section function_body: 72959123 bytes
>
>with patch:
>WPA statistics
>[WPA] read 13139926 SCCs of average size 1.412202
>[WPA] 18556224 tree bodies read in total
>[WPA] # of input files: 2236
>[WPA] # of input cgraph nodes: 411683
>[WPA] # of function bodies: 83824
>[WPA] # of output files: 128
>[WPA] # of output symtab nodes: 1050843
>[WPA] # of output tree pickle references: 685935
>[WPA] # of output tree bodies: 183785
>[WPA] # callgraph partitions: 128
>[WPA] Compression: 404728108 input bytes, 1193421138 uncompressed bytes
>(ratio:
>2.948699)
>[WPA] Size of mmap'd section decls: 288287953 bytes
>[WPA] Size of mmap'd section function_body: 71319730 bytes

That makes it not worth the trouble? It might be most of the trees are still
reachable via DECL_ABSTRACT_ORIGIN from the locals (even if they are unused). 

Do we now aggressively prune unused locals from BLOCK_VARS?

[Bug go/87589] [8/9 regression] index0-out.go FAILs

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87589

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||jakub at gcc dot gnu.org

[Bug c++/87531] [8/9 Regression] assignment operator does nothing if performed as a call via operator=

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87531

Jakub Jelinek  changed:

   What|Removed |Added

   Last reconfirmed|2018-10-08 00:00:00 |2018-11-27
 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Nathan, can you please have a look?  Isn't this somewhat similar to PR87989? 
Though, even current trunk still fails.

[Bug c++/87531] [8/9 Regression] assignment operator does nothing if performed as a call via operator=

2018-11-27 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87531

Nathan Sidwell  changed:

   What|Removed |Added

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

[Bug target/87598] [8/9 Regression] Rejects "%a0" with constant

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87598

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #10 from Jakub Jelinek  ---
This started to ICE with r255230 and r257907 turned that into error instead of
ICE.

[Bug target/87598] [8/9 Regression] Rejects "%a0" with constant

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87598

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #11 from Jakub Jelinek  ---
Created attachment 45101
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45101&action=edit
gcc9-pr87598.patch

Untested fix.

[Bug c++/88216] [9 Regression] ICE (-std=c++2a) in cxx_eval_constant_expression, at cp/constexpr.c:4602

2018-11-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88216

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-11-27
 CC||jason at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
  Known to work||8.2.0
Summary|ICE (-std=c++2a) in |[9 Regression] ICE
   |cxx_eval_constant_expressio |(-std=c++2a) in
   |n, at cp/constexpr.c:4602   |cxx_eval_constant_expressio
   ||n, at cp/constexpr.c:4602
 Ever confirmed|0   |1
  Known to fail||9.0

--- Comment #1 from Martin Liška  ---
Started to ICE in r265789.

@emmanual: is the code snippet a valid or invalid code?

[Bug tree-optimization/88214] ICE in bitmap_intersect_p() on 32-bit BE platforms

2018-11-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88214

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-11-27
 CC||jamborm at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
 Ever confirmed|0   |1
  Known to fail||9.0

--- Comment #2 from Martin Liška  ---
I can confirm that on a compile farm machine (gcc110.fsffrance.org) with:

$ ./xgcc -B. /tmp/pr.c -m32 -c -Wall -O2
during IPA pass: cp
/tmp/pr.c: In function ‘b’:
/tmp/pr.c:7:3: internal compiler error: Segmentation fault
7 |   }
  |   ^
0x10933cab crash_signal
../../gcc/toplev.c:325
0x102d23e4 bitmap_intersect_p(bitmap_head const*, bitmap_head const*)
../../gcc/bitmap.c:1808
0x10bd1c8f pt_solutions_intersect_1
../../gcc/tree-ssa-structalias.c:6847
0x10bd1f7f pt_solutions_intersect(pt_solution*, pt_solution*)
../../gcc/tree-ssa-structalias.c:6853
0x10aac207 call_may_clobber_ref_p_1(gcall*, ao_ref*)
../../gcc/tree-ssa-alias.c:2238
0x10aad38b stmt_may_clobber_ref_p_1(gimple*, ao_ref*, bool)
../../gcc/tree-ssa-alias.c:2280
0x1069cecb determine_locally_known_aggregate_parts
../../gcc/ipa-prop.c:1632
0x106a44d3 ipa_compute_jump_functions_for_edge
../../gcc/ipa-prop.c:1996
0x106a59d3 ipa_compute_jump_functions_for_bb
../../gcc/ipa-prop.c:2024
0x106a59d3 analysis_dom_walker::before_dom_children(basic_block_def*)
../../gcc/ipa-prop.c:2542
0x11332657 dom_walker::walk(basic_block_def*)
../../gcc/domwalk.c:353
0x106a157b ipa_analyze_node(cgraph_node*)
../../gcc/ipa-prop.c:2612
0x113c27f7 ipcp_generate_summary
../../gcc/ipa-cp.c:5112
0x10805fa7 execute_ipa_summary_passes(ipa_opt_pass_d*)
../../gcc/passes.c:2149
0x1038742f ipa_passes
../../gcc/cgraphunit.c:2432
0x1038742f symbol_table::compile()
../../gcc/cgraphunit.c:2543
0x1038a66f symbol_table::compile()
../../gcc/cgraphunit.c:2522
0x1038a66f symbol_table::finalize_compilation_unit()
../../gcc/cgraphunit.c:2788

Martin can you please take a look?

[Bug c++/87531] [8/9 Regression] assignment operator does nothing if performed as a call via operator=

2018-11-27 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87531

--- Comment #3 from Nathan Sidwell  ---
Created attachment 45102
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45102&action=edit
simpler example of original failure, other failure modes added

[Bug c++/88203] assert does not compile with OpenMP's pragma omp parallel for default(none)

2018-11-27 Thread zkoza at ift dot uni.wroc.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88203

--- Comment #3 from Zbyszek  ---
(In reply to Jakub Jelinek from comment #2)
> Note, in OpenMP 3.1 and earlier this would be actually valid:
> "Variables with const-qualified type having no mutable member are shared."
> and __PRETTY_FUNCTION__ etc. is const qualified (const char []).
> This has changed in OpenMP 4.0, such variables are no longer predetermined
> shared, so must be explicitly listed in data sharing clauses for
> default(none).
> There is nothing wrong on the compiler side here.

OK. I rewrote the test program to:

#include  
#include  

int main()
{
  std::cout << __PRETTY_FUNCTION__ << "\n";
#pragma omp parallel for default(none) shared(__PRETTY_FUNCTION__) 
  for (int i = 0; i < 10; i++)
  {
assert (i < 10);
  }
}

==
Effect:
> g++ -fopenmp main.cpp 
main.cpp: In function ‘int main()’:
main.cpp:7:47: error: expected unqualified-id before ‘__PRETTY_FUNCTION__’
 #pragma omp parallel for default(none) shared(__PRETTY_FUNCTION__)
   ^~~
In file included from /usr/include/c++/8.2.1/cassert:44,
 from main.cpp:1:
main.cpp:10:5: error: ‘__PRETTY_FUNCTION__’ not specified in enclosing
‘parallel’
 assert (i < 10);
 ^~
main.cpp:7:9: error: enclosing ‘parallel’
 #pragma omp parallel for default(none) shared(__PRETTY_FUNCTION__)
 ^~~
==

So, __PRETTY_FUNCTION__ is understood by the compiler as long as it does not
enter the OpenMP mode. When in OpenMP, __PRETTY_FUNCTION__  suddenly becomes a
standard variable that needs to be explicitly declared.  

I even don't know how to declare  __PRETTY_FUNCTION__, I am a bit surprised
that this is implemented as a variable rater than a "gcc extension" macro.  

=
Let's compare with clang:

> clang++ -fopenmp main.cpp 
main.cpp:7:47: error: expected variable name
#pragma omp parallel for default(none) shared(__PRETTY_FUNCTION__) 
  ^~~
1 error generated.

==

So, clang also does not allow __PRETTY_FUNCTION__ to be declared inside shared
clause. 

Let's remove this shared clause and go back to the original c++ example

===

> clang++ -fopenmp main.cpp

clean compilation!


===
Conclusion: clang compiles the original example, g++ doesn't.

I think that it would be strange if the implementation of OpenMP's shared
clause would be in conflict with the implementation of assert to the point
where one is forced to give up one of them.

[Bug fortran/88206] [7/8/9 Regression] ICE in gfc_match_type_spec, at fortran/match.c:2229

2018-11-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88206

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #2 from Martin Liška  ---
Started with r241451.

[Bug c++/88216] [9 Regression] ICE (-std=c++2a) in cxx_eval_constant_expression, at cp/constexpr.c:4602

2018-11-27 Thread emmanuel.le-tr...@cnrs-orleans.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88216

--- Comment #2 from emmanuel.le-tr...@cnrs-orleans.fr ---
Valid. This snippet compiles:


struct 
T {};

template 
struct 
U {};

T t;

U  u;

[Bug tree-optimization/88217] [8/9 Regression] Compile time and memory hog w/ -O2 -fstrict-enums -fno-tree-forwprop -fno-tree-fre

2018-11-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88217

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-11-27
 CC||marxin at gcc dot gnu.org,
   ||rguenth at gcc dot gnu.org
  Known to work||7.3.0
 Ever confirmed|0   |1
  Known to fail||8.2.0, 9.0

--- Comment #1 from Martin Liška  ---
Started to be slow with r258646:

Author: rguenth
2018-03-19  Richard Biener  

PR tree-optimization/84933
* tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.

* g++.dg/pr84933.C: New testcase.


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

[Bug c++/88222] New: ubsan error at cp/decl.c for broken code

2018-11-27 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88222

Bug ID: 88222
   Summary: ubsan error at cp/decl.c for broken code
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this broken C++ code:

typedef char a[];

class S {
a : 4;
};

recent gcc built with ubsan does this:

../../trunk/gcc/cp/decl.c:12225:26: runtime error: member access within null
pointer of type 'const struct cp_declarator'
bug483.cc:4:6: internal compiler error: Segmentation fault
4 |  a : 4;
  |  ^
0x276a29f crash_signal
../../trunk/gcc/toplev.c:326
0xa777c5 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
../../trunk/gcc/cp/decl.c:12225

Also:

/home/dcb/gcc/results.265631.ubsan/bin/gcc
bug483.cc:4:6: error: bit-field ‘’ with non-integral type
/home/dcb/gcc/results.265683.asan/bin/gcc
bug483.cc:4:6: internal compiler error: Segmentation fault

So the problem seems to occur sometime between revisions 265631 and 265683.

[Bug fortran/87352] [7/8/9 Regression] Large stack usage with new gfortran

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87352

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||jakub at gcc dot gnu.org,
   ||pault at gcc dot gnu.org,
   ||vehre at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek  ---
The first growth of *.original dump is r241885, where it grew from a ~70KB to
~320KB.  And then the next even larger growth is in r254427.

[Bug c++/88222] ubsan error at cp/decl.c for broken code

2018-11-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88222

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-11-27
 CC||jason at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org,
   ||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1
  Known to fail||9.0

--- Comment #1 from Martin Liška  ---
Confirmed.

[Bug c/88223] New: Wrong code for intrinsic memmove

2018-11-27 Thread fuz at fuz dot su
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88223

Bug ID: 88223
   Summary: Wrong code for intrinsic memmove
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: fuz at fuz dot su
  Target Milestone: ---

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

A user on reddit has pointed out that gcc 8 generates wrong code
for intrinsic memmove() when compiling with optimisations:

https://www.reddit.com/r/C_Programming/comments/a0tdux

The following minimal reproduction was provided:

char s[] = "12345";
memmove(s + 1, s, 4);/* 11234 */
memmove(s + 1, s, 4);/* 11123 */
memmove(s + 1, s, 4);/* 2 */
puts(s);

Without optimisations, this prints "2" as expected whereas
with optimisations, it prints "11123".

I was able to reproduce this problem on FreeBSD with gcc 8.2.0.
The relevant files are attached.

[Bug c/88223] Wrong code for intrinsic memmove

2018-11-27 Thread fuz at fuz dot su
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88223

--- Comment #1 from Robert Clausecker  ---
Created attachment 45104
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45104&action=edit
Verbose compiler output

[Bug c++/87539] [8/9 Regression] internal compiler error when compiling project with Os optimization flag

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87539

--- Comment #3 from Jakub Jelinek  ---
Seems this has been fixed with the PR86687 fix.

[Bug tree-optimization/88214] ICE in bitmap_intersect_p() on 32-bit BE platforms

2018-11-27 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88214

Martin Jambor  changed:

   What|Removed |Added

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

--- Comment #3 from Martin Jambor  ---
OK

[Bug tree-optimization/88223] [8/9 Regression] Wrong code for intrinsic memmove

2018-11-27 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88223

Alexander Monakov  changed:

   What|Removed |Added

   Keywords||wrong-code
 CC||amonakov at gcc dot gnu.org
  Component|c   |tree-optimization
Summary|Wrong code for intrinsic|[8/9 Regression] Wrong code
   |memmove |for intrinsic memmove

--- Comment #2 from Alexander Monakov  ---
Nice find; wrong code due to FRE (in fre1).

[Bug c++/88203] assert does not compile with OpenMP's pragma omp parallel for default(none)

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88203

Jakub Jelinek  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
   Last reconfirmed||2018-11-27
 Resolution|INVALID |---
 Ever confirmed|0   |1

--- Comment #4 from Jakub Jelinek  ---
Ok, I agree something needs to change, either we should accept __func__ etc. in
data-sharing clauses that allow const qualified variables, or it should be
ignored for default(none).  icc and clang choose the latter, but from the
standard wording it seems the right thing is probably accepting it in data
sharing clauses.  I've raised it on OpenMP language committee.

[Bug target/88224] New: Wrong Cortex-R7 and Cortex-R8 FPU configuration

2018-11-27 Thread avieira at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88224

Bug ID: 88224
   Summary: Wrong Cortex-R7 and Cortex-R8 FPU configuration
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: avieira at gcc dot gnu.org
  Target Milestone: ---

The Cortex-R7 and Cortex-R8 TRM's* indicate that both CPUs can be configured
with one of the following FPU options:
1) No FPU
2) Single precision-only VFPv3, with 16 double-precision registers and with
FP16 conversion instructions extension
3) Single and double-precision VFPv3, with 16 double-precision registers and
with FP16 conversion instructions extension.

Currently GCC configures R7 and R8 without FP16 conversion instructions when
using -mcpu=cortex-r7/cortex-r8 and it does not offer the single-precision only
configuration (i.e. no +npfp.dp)


*) https://static.docs.arm.com/ddi0458/c/DDI0458C_cortex_r7_r0p1_trm.pdf
https://static.docs.arm.com/100400/0001/arm_cortexr8_mpcore_processor_trm_100400_0001_03_en.pdf

[Bug c++/87386] [8/9 Regression] Error message for static_assert show wrong range

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87386

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|8.3 |9.0

--- Comment #11 from Jakub Jelinek  ---
Not going to backport for 8.x.

[Bug c++/87386] [8/9 Regression] Error message for static_assert show wrong range

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87386

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug target/87007] [8/9 Regression] 10% slowdown with -march=skylake-avx512

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87007

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Any progress here?

[Bug go/88135] error: reference to undefined identifier ‘syscall.WEXITED’

2018-11-27 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88135

Ian Lance Taylor  changed:

   What|Removed |Added

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

--- Comment #2 from Ian Lance Taylor  ---
Should be fixed on trunk.

[Bug middle-end/84877] Local stack copy of BLKmode parameter on the stack is not aligned when the requested alignment exceeds MAX_SUPPORTED_STACK_ALIGNMENT

2018-11-27 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84877

Rainer Orth  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 CC||ro at gcc dot gnu.org
 Resolution|FIXED   |---

--- Comment #6 from Rainer Orth  ---
(In reply to Renlin Li from comment #5)
> Mark it as fixed.

However, the new test FAILs on quite a number of targets:

  1 hppa-unknown-linux-gnu
  5 m68k-unknown-linux-gnu
  6 moxie-unknown-elf
  6 s390x-ibm-linux-gnu default
  1 sparc-sun-solaris2.11
  4 sparcv9-sun-solaris2.11

I'm seeing it on 32-bit SPARC:

Thread 2 received signal SIGABRT, Aborted.
[Switching to Thread 1 (LWP 1)]
0xfec7de84 in __lwp_sigqueue () from /lib/libc.so.1
(gdb) where
#0  0xfec7de84 in __lwp_sigqueue () from /lib/libc.so.1
#1  0xfebb9818 in raise () from /lib/libc.so.1
#2  0xfeb8b150 in abort () from /lib/libc.so.1
#3  0x00010c6c in foo (p=...)
at /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/pr84877.c:23
#4  0x00010c9c in main ()
at /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/pr84877.c:36

(gdb) p (intptr_t)(&p1)
$3 = 163
(gdb) p (intptr_t)(&p1) & mask
$4 = 3

[Bug target/87007] [8/9 Regression] 10% slowdown with -march=skylake-avx512

2018-11-27 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87007

--- Comment #3 from Uroš Bizjak  ---
(In reply to Jakub Jelinek from comment #2)
> Any progress here?
Please see [1].

[1] https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00255.html

[Bug target/88224] Wrong Cortex-R7 and Cortex-R8 FPU configuration

2018-11-27 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88224

Richard Earnshaw  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-11-27
 Ever confirmed|0   |1

--- Comment #1 from Richard Earnshaw  ---
confirmed

[Bug c++/88222] ubsan error at cp/decl.c for broken code

2018-11-27 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88222

--- Comment #2 from Marek Polacek  ---
Started with r265636.

[Bug target/87007] [8/9 Regression] 10% slowdown with -march=skylake-avx512

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87007

--- Comment #4 from Jakub Jelinek  ---
Sorry for missing it, I was searching for the 87007 number on gcc-patches and
this thread doesn't have it in the subject.

[Bug c++/88222] ubsan error at cp/decl.c for broken code

2018-11-27 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88222

Marek Polacek  changed:

   What|Removed |Added

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

[Bug c++/88222] [9 Regression] ubsan error at cp/decl.c for broken code

2018-11-27 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88222

Marek Polacek  changed:

   What|Removed |Added

   Target Milestone|--- |9.0
Summary|ubsan error at cp/decl.c|[9 Regression] ubsan error
   |for broken code |at cp/decl.c for broken
   ||code

[Bug middle-end/86827] [8/9 Regression] -Warray-bounds produces negative indicies

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86827

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek  ---
Martin, you've changed status to ASSIGNED, but not Assignee.  Are you working
on this, or is Alex working on it?

[Bug c++/88122] [9 Regression] g++ ICE: internal compiler error: Segmentation fault

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88122

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/87214] [9 Regression] SPEC CPU2017, CPU2006 520/620, 403 runfails after r263772 with march=skylake-avx512

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87214

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
Can you still reproduce this?  There have been several vectorizer fixes since
then?

[Bug fortran/87937] [8/9 Regression] LHS reallocation broken inside "select type" and "associate"

2018-11-27 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87937

Dominique d'Humieres  changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|WAITING |NEW
 CC||pault at gcc dot gnu.org
  Known to fail||8.2.0

--- Comment #7 from Dominique d'Humieres  ---
> Could you please kindly suggest what do I need to do to get this out of 
> WAITING? ...

AFAIK you can do it yourself.

WAITING is not a punishment, it just mean that some feedback is needed, most of
the time from the reporter, but sometimes from the maintainers. In this case it
meant that at looked at the PR, but was unable to confirm it.

Now I get a segfault at runtime for the test in comment 5, likely caused by
revision r257363 (pr84115).

[Bug middle-end/87157] [9 regression] gcc.dg/vect/costmodel/ppc/costmodel-vect-33.c fails starting with r263981

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87157

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #8 from Jakub Jelinek  ---
So, I think we should go for:
--- gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-33.c.jj 
2017-03-21 11:10:40.276012822 +
+++ gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-33.c 2018-11-27
15:29:00.685427859 +
@@ -11,7 +11,7 @@ struct test {

 extern struct test s;

-int main1 ()
+__attribute__((noipa)) int main1 ()
 {  
   int i;

We want to test the vectorizer behavior, not depend on how many times the
function has been inlined or versioned.

[Bug gcov-profile/88225] New: Slowness in gcov

2018-11-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88225

Bug ID: 88225
   Summary: Slowness in gcov
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Keywords: compile-time-hog
  Severity: normal
  Priority: P3
 Component: gcov-profile
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

running gcov for tramp3d I see:

$ perf report
 83.09%  gcov gcov  [.]
source_info::get_functions_at_location
 8.68%  gcov gcov  [.] main
 1.16%  gcov libc-2.27.so  [.] vfprintf
 0.70%  gcov [unknown] [k] 0xb5a001a6

I have a patch for that.

[Bug gcov-profile/88225] Slowness in gcov

2018-11-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88225

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-11-27
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org
   Target Milestone|--- |9.0
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Mine.

[Bug tree-optimization/79351] Invalid tree PRE optimization around compound literal

2018-11-27 Thread leonard.r.koenig at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79351

Leonard König  changed:

   What|Removed |Added

 CC||leonard.r.koenig@googlemail
   ||.com

--- Comment #2 from Leonard König  ---
I could reproduce valid/broken cases from GCC-8  down to GCC-5, running on
x86_64 ArchLinux.

[Bug middle-end/87157] [9 regression] gcc.dg/vect/costmodel/ppc/costmodel-vect-33.c fails starting with r263981

2018-11-27 Thread hubicka at ucw dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87157

--- Comment #9 from Jan Hubicka  ---
> @@ -11,7 +11,7 @@ struct test {
> 
>  extern struct test s;
> 
> -int main1 ()
> +__attribute__((noipa)) int main1 ()
>  {  
>int i;
> 
> We want to test the vectorizer behavior, not depend on how many times the
> function has been inlined or versioned.

This looks like a good idea :)

[Bug target/88188] ICE in print_operand, at config/rs6000/rs6000.c

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88188

--- Comment #2 from Jakub Jelinek  ---
Author: jakub
Date: Tue Nov 27 15:40:57 2018
New Revision: 266515

URL: https://gcc.gnu.org/viewcvs?rev=266515&root=gcc&view=rev
Log:
PR target/88188
* config/rs6000/rs6000.c (print_operand) : Use
output_operand_lossage instead of gcc_assert.
: Likewise.
: Likewise.
: Use output_operand_lossage instead of gcc_unreachable.

* gcc.target/powerpc/pr88188.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/powerpc/pr88188.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-11.c

[Bug preprocessor/83173] C preprocessor generates incorrect linemarkers

2018-11-27 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83173

--- Comment #12 from David Malcolm  ---
Author: dmalcolm
Date: Tue Nov 27 15:49:43 2018
New Revision: 266516

URL: https://gcc.gnu.org/viewcvs?rev=266516&root=gcc&view=rev
Log:
PR preprocessor/83173: Additional check before decrementing highest_location

2018-11-27  Mike Gulick  

PR preprocessor/83173
* files.c (_cpp_stack_include): Check if
line_table->highest_location is past current line before
decrementing.


Modified:
trunk/libcpp/ChangeLog
trunk/libcpp/files.c

[Bug c++/88184] [9 Regression] ICE on (invalid) C++ code when compiled with -std=c++2a: unexpected expression ‘f’ of kind template_id_expr

2018-11-27 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88184

--- Comment #3 from Marek Polacek  ---
FWIW, I'm still unable to reproduce.  Tried (non-)bootstrap + (non-)checking
builds but I get the output in Comment 2.

[Bug rtl-optimization/87718] [9 Regression] FAIL: gcc.target/i386/avx512dq-concatv2si-1.c

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87718

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #8 from Jakub Jelinek  ---
Fixed, thanks.

[Bug preprocessor/83173] C preprocessor generates incorrect linemarkers

2018-11-27 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83173

--- Comment #13 from David Malcolm  ---
Author: dmalcolm
Date: Tue Nov 27 15:53:51 2018
New Revision: 266518

URL: https://gcc.gnu.org/viewcvs?rev=266518&root=gcc&view=rev
Log:
PR preprocessor/83173: New test

2018-11-27  Mike Gulick  

PR preprocessor/83173
* gcc.dg/plugin/location-overflow-test-pr83173.c: New test.
* gcc.dg/plugin/location-overflow-test-pr83173.h: Header for
pr83173.c.
* gcc.dg/plugin/location-overflow-test-pr83173-1.h: Header for
pr83173.c.
* gcc.dg/plugin/location-overflow-test-pr83173-2.h: Header for
pr83173.c.
* gcc.dg/plugin/location_overflow_plugin.c: Use PLUGIN_PRAGMAS
instead of PLUGIN_START_UNIT.
* gcc.dg/plugin/plugin.exp: Enable new test.


Added:
trunk/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr83173-1.h
trunk/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr83173-2.h
trunk/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr83173.c
trunk/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr83173.h
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/plugin/location_overflow_plugin.c
trunk/gcc/testsuite/gcc.dg/plugin/plugin.exp

[Bug fortran/87937] [8/9 Regression] LHS reallocation broken inside "select type" and "associate"

2018-11-27 Thread trnka at scm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87937

--- Comment #8 from Tomáš Trnka  ---
(In reply to Dominique d'Humieres from comment #7)
> > Could you please kindly suggest what do I need to do to get this out of 
> > WAITING? ...
> 
> AFAIK you can do it yourself.
> 
> WAITING is not a punishment, it just mean that some feedback is needed, most
> of the time from the reporter, but sometimes from the maintainers. In this
> case it meant that at looked at the PR, but was unable to confirm it.

OK, sorry for the noise then, I just found no way to change it myself. The only
statuses offered in the drop-down for me were WAITING and RESOLVED.

> Now I get a segfault at runtime for the test in comment 5, likely caused by
> revision r257363 (pr84115).

OK, sounds like it might be an unrelated issue to the one I'm seeing. The
following variant of that test crashes for me as well, even though there aren't
any allocatable character strings in it. There's still no allocation code
generated.

program p
   integer, allocatable :: z(:)
   call s(z)
contains
   subroutine s(x)
  integer, allocatable :: x(:)
  associate (y => x)
 y = [1, 2, 3]
  end associate
  print *, allocated(x), size(x), x
   end
end

In case this turns out to be an unrelated issue, could you double-check if you
get a call to malloc() with the original test in my first post?

[Bug gcov-profile/88225] Slowness in gcov

2018-11-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88225

--- Comment #2 from Martin Liška  ---
Patch candidate:
https://gcc.gnu.org/ml/gcc-patches/2018-11/msg02203.html

[Bug tree-optimization/79351] Invalid tree PRE optimization around compound literal

2018-11-27 Thread wellons at nullprogram dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79351

--- Comment #3 from Chris Wellons  ---
This bug is still present in GCC 8.2.0. I just tested my example again on
x86-64, i686, and ARM64.

[Bug middle-end/86827] [8/9 Regression] -Warray-bounds produces negative indicies

2018-11-27 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86827

Martin Sebor  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW

--- Comment #6 from Martin Sebor  ---
I'm not working on this at the moment.

[Bug preprocessor/83173] C preprocessor generates incorrect linemarkers

2018-11-27 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83173

--- Comment #14 from David Malcolm  ---
Author: dmalcolm
Date: Tue Nov 27 16:04:31 2018
New Revision: 266520

URL: https://gcc.gnu.org/viewcvs?rev=266520&root=gcc&view=rev
Log:
PR preprocessor/83173: Enhance -fdump-internal-locations output

gcc/ChangeLog:
2018-11-27  Mike Gulick  

PR preprocessor/83173
* input.c (dump_location_info): Dump reason and included_from
fields from line_map_ordinary struct.  Fix indentation when
location > 5 digits.
* diagnostic-show-locus.c (num_digits, num_digits): Move to
diagnostic.c to allow it to be utilized by input.c.
* diagnostic.c (num_digits, selftest::test_num_digits): Moved
here.
(selftest::diagnostic_c_tests): Run selftest::test_num_digits.
* diagnostic.h (num_digits): Add extern definition.

libcpp/ChangeLog:
2018-11-27  Mike Gulick  

PR preprocessor/83173
* location-example.txt: Update example -fdump-internal-locations
output.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/diagnostic-show-locus.c
trunk/gcc/diagnostic.c
trunk/gcc/diagnostic.h
trunk/gcc/input.c
trunk/libcpp/ChangeLog
trunk/libcpp/location-example.txt

[Bug fortran/87937] [8/9 Regression] LHS reallocation broken inside "select type" and "associate"

2018-11-27 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87937

--- Comment #9 from Dominique d'Humieres  ---
> OK, sounds like it might be an unrelated issue to the one I'm seeing. The
> following variant of that test crashes for me as well, even though there 
> aren't
> any allocatable character strings in it. There's still no allocation code
> generated.

I got a segfault with this test since at least 4.8.5 up to trunk (9.0).

[Bug fortran/88205] ICE in gfc_wide_strncasecmp, at fortran/scanner.c:249

2018-11-27 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88205

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-11-27
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
> With a non-scalar-default-char-expr, down to at least gcc-5 :

Confirmed from 4.8 up to trunk (9.0).

[Bug sanitizer/85663] [8/9 Regression] gcc-8.0.1 regression: sanitizer fails to build on mips-unknown-linux-gnu

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85663

Jakub Jelinek  changed:

   What|Removed |Added

 CC||hp at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek  ---
CCing Hans-Peter, who has enabled libsanitizer on mips*.  If this needs to be
done, it should be ideally pushed upstream first and then cherry-picked.

[Bug c++/86610] [8/9 Regression] non-const operator erroneously called in lambda in templated function

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86610

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek  ---
Nathan, another r255605 regression, can you please have a look?

[Bug middle-end/88226] New: missing warning on fprintf, fputs, and puts with an unterminated array

2018-11-27 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88226

Bug ID: 88226
   Summary: missing warning on fprintf, fputs, and puts with an
unterminated array
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

Of the invalid uses of an unterminated character array below GCC diagnoses just
the first and none of the others.

$ cat t.c && gcc -O2 -S -Wall -fdump-tree-optimized=/dev/stdout t.c
#include 

const char c = 'a';

void g (FILE *f)
{
  printf ("%s", &c);// warning (good)

  fprintf (f, "%s", &c);// missing warning
  fputs (&c, f);// same
  puts (&c);// same
}
t.c: In function ‘g’:
t.c:7:12: warning: ‘%s’ directive argument is not a nul-terminated string
[-Wformat-overflow=]
7 |   printf ("%s", &c);// warning (good)
  |   ~^~~~
t.c:3:12: note: referenced argument declared here
3 | const char c = 'a';
  |^

;; Function g (g, funcdef_no=11, decl_uid=2409, cgraph_uid=12, symbol_order=12)

g (struct FILE * f)
{
   [local count: 1073741824]:
  printf ("%s", &c);
  __builtin_fputs (&c, f_3(D));
  fputs (&c, f_3(D));
  puts (&c); [tail call]
  return;

}

[Bug middle-end/88226] missing warning on fprintf, fputs, and puts with an unterminated array

2018-11-27 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88226

Martin Sebor  changed:

   What|Removed |Added

   Keywords||diagnostic
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=87756,
   ||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=88211

--- Comment #1 from Martin Sebor  ---
See also pr87756 and pr88211.

[Bug middle-end/88226] missing warning on fprintf, fputs, and puts with an unterminated array

2018-11-27 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88226

--- Comment #2 from Martin Sebor  ---
Author: msebor
Date: Tue Nov 27 17:07:24 2018
New Revision: 266522

URL: https://gcc.gnu.org/viewcvs?rev=266522&root=gcc&view=rev
Log:
PR 87756 - missing unterminated argument warning using address of a constant
character
PR 88211 - missing warning on printf %ls and unterminated wide member array
PR 88226 - missing warning on fprintf, fputs, and puts with an unterminated
array

gcc/ChangeLog:

* gcc.dg/tree-ssa/builtin-fprintf-warn-1.c: Update/remove xfails.
* gcc.dg/tree-ssa/builtin-printf-warn-1.c: Same.
* gcc.dg/tree-ssa/user-printf-warn-1.c: Same.


Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-warn-1.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-warn-1.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/user-printf-warn-1.c

[Bug tree-optimization/87756] missing unterminated argument warning using address of a constant character

2018-11-27 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87756

--- Comment #7 from Martin Sebor  ---
Author: msebor
Date: Tue Nov 27 17:07:24 2018
New Revision: 266522

URL: https://gcc.gnu.org/viewcvs?rev=266522&root=gcc&view=rev
Log:
PR 87756 - missing unterminated argument warning using address of a constant
character
PR 88211 - missing warning on printf %ls and unterminated wide member array
PR 88226 - missing warning on fprintf, fputs, and puts with an unterminated
array

gcc/ChangeLog:

* gcc.dg/tree-ssa/builtin-fprintf-warn-1.c: Update/remove xfails.
* gcc.dg/tree-ssa/builtin-printf-warn-1.c: Same.
* gcc.dg/tree-ssa/user-printf-warn-1.c: Same.


Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-warn-1.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-warn-1.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/user-printf-warn-1.c

[Bug middle-end/88211] missing warning on printf %ls and unterminated wide member array

2018-11-27 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88211

--- Comment #2 from Martin Sebor  ---
Author: msebor
Date: Tue Nov 27 17:07:24 2018
New Revision: 266522

URL: https://gcc.gnu.org/viewcvs?rev=266522&root=gcc&view=rev
Log:
PR 87756 - missing unterminated argument warning using address of a constant
character
PR 88211 - missing warning on printf %ls and unterminated wide member array
PR 88226 - missing warning on fprintf, fputs, and puts with an unterminated
array

gcc/ChangeLog:

* gcc.dg/tree-ssa/builtin-fprintf-warn-1.c: Update/remove xfails.
* gcc.dg/tree-ssa/builtin-printf-warn-1.c: Same.
* gcc.dg/tree-ssa/user-printf-warn-1.c: Same.


Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-warn-1.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-warn-1.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/user-printf-warn-1.c

[Bug middle-end/88226] missing warning on fprintf, fputs, and puts with an unterminated array

2018-11-27 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88226

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-11-27
 Ever confirmed|0   |1

--- Comment #3 from Martin Sebor  ---
Confirmed as per the xfailed tests that show these missing warnings (comment
#2).

[Bug middle-end/88211] missing warning on printf %ls and unterminated wide member array

2018-11-27 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88211

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-11-27
 Ever confirmed|0   |1

--- Comment #3 from Martin Sebor  ---
Confirmed as per the xfailed tests that show these missing warnings (comment
#2).

[Bug c++/88136] -Wdeprecated-copy is draconian and shouldn't be in -Wall

2018-11-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88136

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-11-27
 CC||jason at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug ada/88200] [9 Regression] ada bootstrap failure on alpha-linux-gnu (aised STORAGE_ERROR : stack overflow or erroneous memory access)

2018-11-27 Thread doko at debian dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88200

--- Comment #2 from Matthias Klose  ---
reproduced with r266507. The native x86_64-linux-gnu compiler is configured
with

--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-9
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib
--with-target-system-zlib --enable-objc-gc=auto --enable-multiarch
--disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu

note the --enable-default-pie.

the cross compiler with

 --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++
 --prefix=/usr
 --with-gcc-major-version-only
 --program-suffix=-9
 --enable-shared
 --enable-linker-build-id
 --libexecdir=/usr/lib
 --without-included-gettext
 --enable-threads=posix
 --libdir=/usr/lib
 --enable-nls
 --with-sysroot=/
 --enable-clocale=gnu
 --enable-libstdcxx-debug
 --enable-libstdcxx-time=yes
 --with-default-libstdcxx-abi=new
 --enable-gnu-unique-object
 --disable-libssp
 --disable-libsanitizer
 --disable-libquadmath
 --disable-libquadmath-support
 --enable-plugin
 --with-system-zlib
 --disable-libphobos
 --enable-multiarch
 --disable-werror
 --with-long-double-128
 --enable-checking=release
 --build=x86_64-linux-gnu
 --host=x86_64-linux-gnu
 --target=alpha-linux-gnu
 --program-prefix=alpha-linux-gnu-
 --includedir=/usr/alpha-linux-gnu/include

[Bug c++/86205] [9 Regression] ICE on valid C++11 code: in type_dependent_expression_p, at cp/pt.c:25193

2018-11-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86205

Jason Merrill  changed:

   What|Removed |Added

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

[Bug tree-optimization/79351] [7/8/9 Regression] Invalid tree PRE optimization around compound literal

2018-11-27 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79351

Alexander Monakov  changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|WAITING |NEW
 CC||amonakov at gcc dot gnu.org
  Known to work||4.3.2
Summary|Invalid tree PRE|[7/8/9 Regression] Invalid
   |optimization around |tree PRE optimization
   |compound literal|around compound literal
  Known to fail||4.7.2

--- Comment #4 from Alexander Monakov  ---
Thanks, confirmed. Reduced testcase, aborts with -O -ftree-pre:

static struct state {
int k;
int dummy;
} states[256];

__attribute((noipa))
static void
ismatch(int n)
{
for (int j=0; j

[Bug fortran/80467] Function Without Arguments Fails to Generate Error When Declared Later

2018-11-27 Thread gs...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80467

G. Steinmetz  changed:

   What|Removed |Added

 CC||gs...@t-online.de

--- Comment #8 from G. Steinmetz  ---

Update, renewing some insights from above. Also related to pr40678.


$ cat z1.f90
program p
contains
   subroutine testargs
  x = g !()
   end
   real function g()
  g = 3.0
   end
end


$ cat z2.f90
program p   ! reversed order
contains
   real function g()
  g = 3.0
   end
   subroutine testargs
  x = g !()
   end
end


$ gfortran-9-20181125 -c z2.f90
z2.f90:7:12:
7 |   x = g !()
  |1
Error: Function 'g' requires an argument list at (1)


$ gfortran-9-20181125-chk -c z1.f90   # with --enable-checking=yes
z1.f90:3:0:
3 |subroutine testargs
  |
Error: invalid types in conversion to floating point
real(kind=4)
real(kind=4) (*) (void)
x = (real(kind=4)) g;
z1.f90:3:0: internal compiler error: verify_gimple failed
0xcce85d verify_gimple_in_seq(gimple*)
../../gcc/tree-cfg.c:5082
0x9e2235 gimplify_body(tree_node*, bool)
../../gcc/gimplify.c:13636
0x9e2524 gimplify_function_tree(tree_node*)
../../gcc/gimplify.c:13726
0xd3816f gimplify_all_functions
../../gcc/tree-nested.c:3410
0xd3815f gimplify_all_functions
../../gcc/tree-nested.c:3413
0xd41e9e lower_nested_functions(tree_node*)
../../gcc/tree-nested.c:3430
0x82c560 cgraph_node::analyze()
../../gcc/cgraphunit.c:673
0x82f9e9 analyze_functions
../../gcc/cgraphunit.c:1126
0x830ac2 symbol_table::finalize_compilation_unit()
../../gcc/cgraphunit.c:2835

[Bug fortran/88227] New: ICE in gfc_convert_boz, at fortran/target-memory.c:788

2018-11-27 Thread gs...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88227

Bug ID: 88227
   Summary: ICE in gfc_convert_boz, at fortran/target-memory.c:788
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gs...@t-online.de
  Target Milestone: ---

With -m32 down to at least gfortran-5 :


$ cat z1.f90
program p
   print *, dble(b'1010101001101')
end


$ cat z2.f90
program p
   print *, real(b'1010101001101')
end


$ gfortran-9-20181125 -m32 -fdefault-real-8 -c z2.f90
$ gfortran-9-20181125 -m64 -fdefault-real-8 -c z1.f90
$
$ gfortran-9-20181125 -m32 -fdefault-real-8 -c z1.f90
f951: internal compiler error: Segmentation fault
0xb2bcff crash_signal
../../gcc/toplev.c:326
0x6b1ba9 mode_to_bytes(machine_mode)
../../gcc/machmode.h:520
0x6b1ba9 if_nonpoly::is_poly>::type
GET_MODE_SIZE(scalar_int_mode const&)
../../gcc/machmode.h:617
0x6b1ba9 size_integer
../../gcc/fortran/target-memory.c:42
0x6b2ffc gfc_convert_boz(gfc_expr*, gfc_typespec*)
../../gcc/fortran/target-memory.c:788
0x69cb60 convert_boz
../../gcc/fortran/simplify.c:226
0x6a88a3 gfc_simplify_dble(gfc_expr*)
../../gcc/fortran/simplify.c:
0x62dedf do_simplify
../../gcc/fortran/intrinsic.c:4480
0x6385be gfc_intrinsic_func_interface(gfc_expr*, int)
../../gcc/fortran/intrinsic.c:4875
0x68f961 resolve_unknown_f
../../gcc/fortran/resolve.c:2875
0x68f961 resolve_function
../../gcc/fortran/resolve.c:3213
0x68c1cd gfc_resolve_expr(gfc_expr*)
../../gcc/fortran/resolve.c:6832
0x68420b gfc_resolve_code(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.c:11262
0x693edf gfc_resolve_blocks(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.c:10302
0x684399 gfc_resolve_code(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.c:11252
0x68702f resolve_codes
../../gcc/fortran/resolve.c:16704
0x6870fe gfc_resolve(gfc_namespace*)
../../gcc/fortran/resolve.c:16739
0x674e87 resolve_all_program_units
../../gcc/fortran/parse.c:6064
0x674e87 gfc_parse_file()
../../gcc/fortran/parse.c:6314
0x6bdaff gfc_be_parse_file
../../gcc/fortran/f95-lang.c:204

[Bug fortran/88228] New: ICE in check_null, at fortran/expr.c:2691

2018-11-27 Thread gs...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88228

Bug ID: 88228
   Summary: ICE in check_null, at fortran/expr.c:2691
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gs...@t-online.de
  Target Milestone: ---

With option -fdec since gfortran-7 :


$ cat z1.f90
program p
   integer :: n = .not. 1
end


$ cat z2.f90
program p
   integer :: j = .true. .or. 1
end


$ gfortran-9-20181125 -c z1.f90
z1.f90:2:23:

2 |integer :: n = .not. 1
  |   1
Error: Operand of .not. operator at (1) is INTEGER(4)


$ gfortran-9-20181125 -c z1.f90 -fdec
f951: internal compiler error: Segmentation fault
0xb2bcff crash_signal
../../gcc/toplev.c:326
0x61e8f6 check_null
../../gcc/fortran/expr.c:2691
0x61e8f6 gfc_check_init_expr(gfc_expr*)
../../gcc/fortran/expr.c:2792
0x61ecb7 gfc_reduce_init_expr(gfc_expr*)
../../gcc/fortran/expr.c:2955
0x621d90 gfc_match_init_expr(gfc_expr**)
../../gcc/fortran/expr.c:3001
0x60f189 variable_decl
../../gcc/fortran/decl.c:2710
0x60f189 gfc_match_data_decl()
../../gcc/fortran/decl.c:5921
0x66dc23 match_word
../../gcc/fortran/parse.c:65
0x66dc23 decode_statement
../../gcc/fortran/parse.c:376
0x66f6aa next_free
../../gcc/fortran/parse.c:1234
0x66f6aa next_statement
../../gcc/fortran/parse.c:1466
0x671a14 parse_spec
../../gcc/fortran/parse.c:3674
0x673787 parse_progunit
../../gcc/fortran/parse.c:5671
0x674e09 gfc_parse_file()
../../gcc/fortran/parse.c:6211
0x6bdaff gfc_be_parse_file
../../gcc/fortran/f95-lang.c:204

  1   2   >