[Bug c/88587] [6.1/trunk] internal compiler error: in expand_debug_locations, at cfgexpand.c:5450

2018-12-24 Thread nbkolchin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88587

--- Comment #1 from Nickolay Kolchin-Semyonov  ---

Error seems to happen when both:

1. Vector extensions are used.
2. Both SSE and non-SSE versions are requested.

Error seems to be present in all GCC versions since 6.1 (which introduced
target_clones).

[Bug rtl-optimization/88588] New: ICE in make_decl_rtl, at varasm.c:1329

2018-12-24 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88588

Bug ID: 88588
   Summary: ICE in make_decl_rtl, at varasm.c:1329
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code, openmp
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
Target: x86_64-pc-linux-gnu

gcc-9.0.0-alpha20181223 snapshot (r267388), 8.2, 7.4, 6.3, 5.4, 4.9.4 all ICE
when compiling the following snippet w/ -O1 (-Os, -Og) -fopenmp:

int *ke;

#pragma omp declare simd
void
q0 (int c3)
{
  int *az = &c3;

  for (;;)
{
  *ke = *az;
  az = ke;
}
}

% x86_64-pc-linux-gnu-gcc-9.0.0-alpha20181223 -O1 -fopenmp -c rmglvxze.c
during RTL pass: expand
rmglvxze.c: In function 'q0.simdclone.0':
rmglvxze.c:5:1: internal compiler error: in make_decl_rtl, at varasm.c:1329
5 | q0 (int c3)
  | ^~
0x6f42ca make_decl_rtl(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181223/work/gcc-9-20181223/gcc/varasm.c:1329
0x9e2e07 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181223/work/gcc-9-20181223/gcc/expr.c:9938
0x9edaaf expand_expr
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181223/work/gcc-9-20181223/gcc/expr.h:279
0x9edaaf expand_expr_addr_expr_1
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181223/work/gcc-9-20181223/gcc/expr.c:7945
0x9e13ff expand_expr_addr_expr
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181223/work/gcc-9-20181223/gcc/expr.c:8066
0x9e13ff expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181223/work/gcc-9-20181223/gcc/expr.c:11221
0xdb61ef expand_expr
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181223/work/gcc-9-20181223/gcc/expr.h:279
0xdb61ef insert_value_copy_on_edge
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181223/work/gcc-9-20181223/gcc/tree-outof-ssa.c:319
0xdb61ef eliminate_phi
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181223/work/gcc-9-20181223/gcc/tree-outof-ssa.c:749
0xdb61ef expand_phi_nodes(ssaexpand*)
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181223/work/gcc-9-20181223/gcc/tree-outof-ssa.c:1007
0x8d64ee execute
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181223/work/gcc-9-20181223/gcc/cfgexpand.c:6479

[Bug c/88589] New: ICE + seemingly wrong codegen with m68k-elf

2018-12-24 Thread lionel_debroux at yahoo dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88589

Bug ID: 88589
   Summary: ICE + seemingly wrong codegen with m68k-elf
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: lionel_debroux at yahoo dot fr
  Target Milestone: ---

Created attachment 45283
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45283&action=edit
The original source file

I looked for other bugs for the m68k-elf target, there are several ICEs but
none of them looks the same. Also, no change when passing -fno-strict-aliasing
-fwrapv to gcc.


I'm in the process of making
https://github.com/debrouxl/tilibs/blob/master/libticalcs/trunk/src/romdump_9x/romdump.c
build with standard m68k toolchains, removing a hard dependency on the GCC4TI
headers and custom toolchain.
The original plan was to make a pure ASM version of that program - it's small,
after all - but I noticed that Debian packages a m68k ELF toolchain (in sid,
binutils 2.31.1 and GCC 8.2.0), so I decided to give those a try at first.

In the process of making the code closer to what I want the assembly version to
be, I hit two snags:


1) an ICE when adding a normally innocuous line of code, "*cmd = CMD_NONE;", in
RecvPacket().
"during RTL pass: ira
romdump_testcase_ice.c:603:1: internal compiler error: in form_sum, at
reload.c:5331"

The command-line invocation was
gcc -c romdump_testcase_ice.c -o romdump_testcase_ice -Os -s -fdata-sections
-Wall -W -Wwrite-strings -mpcrel -Wa,-l -fomit-frame-pointer -m68000 -mshort
-ffreestanding -fcall-used-d0 -fcall-used-d1 -fcall-used-d2 -fcall-used-a0
-fcall-used-a1 -fcall-saved-d3 -fcall-saved-d4 -fcall-saved-d5 -fcall-saved-d6
-fcall-saved-d7 -fno-optimize-sibling-calls --verbose -save-temps -fverbose-asm


2) when that "*cmd = CMD_NONE;" line is commented out, there's a code
generation issue on line 543, between the two nops.
* as it is, the compiler generates a single 16-bit read + rotate + write
instead of the expected 32-bit, or possibly 2 x 16-bit, operations:
move.w -4098(%fp),%d0   | MEM[(uint8_t[4102] *)&buf + 4B],
MEM[(uint8_t[4102] *)&buf + 4B]
ror.w #8,%d0|, MEM[(uint8_t[4102] *)&buf + 4B]
move.w %d0,-7982(%fp)   | MEM[(uint8_t[4102] *)&buf + 4B], %sfp

* when I'm using two 16-bit values and OR'ing them together, the compiler also
generates a single 16-bit read + rotate + write;

* when I'm using the same 16-bit values and adding them together, the compiler
generates more or less the code I expect. It's not very optimized, but I could
just rewrite that part using inline ASM with C operands.

AFAICT, I'm not invoking UB by left shifts of counts larger than the width of
the variable, because I use casts to uint32_t before shifting.

The command-line invocation is the same as 1).

[Bug c/88589] ICE + seemingly wrong codegen with m68k-elf

2018-12-24 Thread lionel_debroux at yahoo dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88589

--- Comment #1 from Lionel Debroux  ---
Created attachment 45284
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45284&action=edit
The preprocessed source file for the ICE

[Bug c/88589] ICE + seemingly wrong codegen with m68k-elf

2018-12-24 Thread lionel_debroux at yahoo dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88589

--- Comment #2 from Lionel Debroux  ---
Created attachment 45285
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45285&action=edit
The generated S file for the wrong codegen described in 2)

[Bug testsuite/67974] Missing gcc/testsuite/gcc.target/x86_64/abi/avx/asm-support-darwin.s file

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67974

--- Comment #1 from Iain Sandoe  ---
Author: iains
Date: Mon Dec 24 09:02:03 2018
New Revision: 267395

URL: https://gcc.gnu.org/viewcvs?rev=267395&root=gcc&view=rev
Log:
Fix PR67974 for Darwin by adding an asm shim for AVX.

The PR is about a set of tests that were not executed because of
missing asm support.  

However, the assembler can handle the insns now, so the tests are
attempted (but with a missing asm shim they fail).

This adds the shim.

In principle (bugs notwithstanding) Darwin’s x86_64 ABI is supposed
to follow the sysv psABI so we can have essentially a copy of the
Linux one.

2018-12-24  Iain Sandoe  

PR testsuite/67974
* gcc.target/x86_64/abi/avx/asm-support-darwin.s: New.


Added:
trunk/gcc/testsuite/gcc.target/x86_64/abi/avx/asm-support-darwin.s
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c/88589] ICE + seemingly wrong codegen with m68k-elf

2018-12-24 Thread lionel_debroux at yahoo dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88589

--- Comment #3 from Lionel Debroux  ---
Created attachment 45286
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45286&action=edit
The output of m68k-linux-gnu-gcc -dumpspecs

[Bug middle-end/88588] ICE in make_decl_rtl, at varasm.c:1329

2018-12-24 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88588

Andrew Pinski  changed:

   What|Removed |Added

  Component|rtl-optimization|middle-end

--- Comment #1 from Andrew Pinski  ---
I don't think GCC 4.8.x implemented the "omp declare simd" so it is most likely
ignoring it there.

[Bug testsuite/67974] Missing gcc/testsuite/gcc.target/x86_64/abi/avx/asm-support-darwin.s file

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67974

--- Comment #2 from Iain Sandoe  ---
Author: iains
Date: Mon Dec 24 09:16:25 2018
New Revision: 267396

URL: https://gcc.gnu.org/viewcvs?rev=267396&root=gcc&view=rev
Log:
Fix PR67974 for Darwin by adding an asm shim for AVX.

The PR is about a set of tests that were not executed because of
missing asm support.  

However, the assembler can handle the insns now, so the tests are
attempted (but with a missing asm shim they fail).

This adds the shim.

In principle (bugs notwithstanding) Darwin’s x86_64 ABI is supposed
to follow the sysv psABI so we can have essentially a copy of the
Linux one.

2018-12-24  Iain Sandoe  

PR testsuite/67974
* gcc.target/x86_64/abi/avx/asm-support-darwin.s: New.


Added:
   
branches/gcc-8-branch/gcc/testsuite/gcc.target/x86_64/abi/avx/asm-support-darwin.s
Modified:
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c/88584] GCC thinks that the type is complete dispite shaddowing.

2018-12-24 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88584

--- Comment #5 from Andreas Schwab  ---
The examples in the DR only show identifiers with linkage and with compatible
types, but the shadowing decl in the example above has no linkage and an
incompatible type.

[Bug bootstrap/88590] New: System Integrity Protection (SIP) breaks GCC build assumptions on Darwin.

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88590

Bug ID: 88590
   Summary: System Integrity Protection (SIP) breaks GCC build
assumptions on Darwin.
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: iains at gcc dot gnu.org
  Target Milestone: ---

Synopsis:

macOS from 10.11 (darwin15) has a new measure of default system protection,
where there is no "root" access to certain parts of the system (e.g. /usr etc.)
and executables are protected from dynamic loader exploits - such as
interposing unauthorised libraries using "DYLD_LIBARRY_PATH" (Darwin's
equivalent of LD_LIBRARY_PATH).

Unfortunately, GCC's build and test environment relies on using
DYLD_LIBRARY_PATH to point to the uninstalled libraries just built by the
toolchain (these might even be needed during the actual build).

So, when SIP is enabled (the default), DYLD_xxx are silently ignored. By dumb
luck mostly we are succeeding with builds - this is because the compiler is
built with statically-linked libstdc++ & libgcc (technically the latter fires
another problem, related to incorrect unwinder usage, but let's put that to one
side, since GCC is not supposed to use exceptions).

Unprotected executables (e.g. the ones we build and the test suite exes) can
use DYLD_LIBRARY_PATH so 

DYLD_LIBRARY_PATH=somewhere/with/a/test/library ./foo 

will work.

But
export DYLD_LIBRARY_PATH=somewhere/with/a/test/library

will not work, because that uses a "protected" binary (/use/bin/bash).

So .. I think that one needs to do

make install-target && make check.

To get meaningful test results with SIP enabled 

even so, the behaviour of configure tests might be suspect, if the result would
depend on a built library rather than one installed on the system.

= What to do?

(non)-Fix 
=

Disable SIP.

This is not something we should be requiring - it's not really acceptable for
the toolchain build to force reduction in system security measures.  However,
Apple provides a mechanism for switching SIP off and when that is done
DYLD_LIBRARY_PATH works again [and we then fire up PR84257 (since the handling
of DYLD_LIBRARY_PATH with SIP switched off seems to be very slow)].

Possible fix #1
===

This is what I've been tinkering with

1) convert all the target libraries to use @rpath/libx.dylib as their
install names
2) get GCC to emit the necessary rpaths into executables during build and test
(and, obviously, at install time).

Actually, this is sensibly in line with a useful macOS deployment model - since
the "approved" way to package shared libraries on macOS / Darwin is to place
them alongside the executables and use rpaths.

unfortunately:
 * it's quite an involved set of changes and almost certainly not going to
happen for 9.
 * there are details to work out to make sure that build-time paths don't leak
into installed libraries/exes.

Possible fix #2
===

Have a build environment where all the used executables and paths are outside
the remit of SIP.  This is untested so far, and might not suit the casual user
of GCC - since it would involve building at least a shell / make / GCC
prerequisites etc.

[Bug bootstrap/88590] System Integrity Protection (SIP) breaks GCC build assumptions on Darwin.

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88590

Iain Sandoe  changed:

   What|Removed |Added

   Keywords||build
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-12-24
   Target Milestone|--- |10.0
 Ever confirmed|0   |1
  Build||x86_64-apple-darwin1[5678]

[Bug target/81685] [7/8 Regression] FAIL: g++.dg/debug/dwarf2/inline-ns-2.C -std=gnu++* (internal compiler error) on darwin

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81685

--- Comment #10 from Iain Sandoe  ---
Author: iains
Date: Mon Dec 24 12:20:18 2018
New Revision: 267401

URL: https://gcc.gnu.org/viewcvs?rev=267401&root=gcc&view=rev
Log:
fix Darwin target/81685

2018-12-24  Iain Sandoe  

Backport from mainline
2018-08-15  Iain Sandoe  

PR target/81685
* config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
DEBUG_PUBTYPES_SECTION) update to include GNU variant.


Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/config/darwin.h

[Bug target/81685] [7/8 Regression] FAIL: g++.dg/debug/dwarf2/inline-ns-2.C -std=gnu++* (internal compiler error) on darwin

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81685

Iain Sandoe  changed:

   What|Removed |Added

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

--- Comment #11 from Iain Sandoe  ---
fixed

[Bug libstdc++/70694] 50 experimental/filesystem/* failures on x86_64-apple-darwin10

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70694

--- Comment #12 from Iain Sandoe  ---
Author: iains
Date: Mon Dec 24 12:26:11 2018
New Revision: 267402

URL: https://gcc.gnu.org/viewcvs?rev=267402&root=gcc&view=rev
Log:
Fix Darwin PR libstdc++/70694

2018-12-24  Iain Sandoe  

Backport from mainline
2018-08-25  Iain Sandoe  

PR libstdc++/70694
* configure.host (OPT_LDFLAGS): Don't append
-fvisibility-inlines-hidden for newer Darwin.


Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
branches/gcc-7-branch/libstdc++-v3/configure.host

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

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78544

--- Comment #8 from Iain Sandoe  ---
Author: iains
Date: Mon Dec 24 12:30:24 2018
New Revision: 267403

URL: https://gcc.gnu.org/viewcvs?rev=267403&root=gcc&view=rev
Log:
Fix tree-prof section tests on Darwin.

Add Darwin section names.

2018-12-24  Iain Sandoe  

Backport from mainline
2018-08-16  Iain Sandoe 

PR testsuite/78544
* gcc.dg/tree-prof/section-attr-1.c: Add Darwin-specific section
attributes and matching.
* gcc.dg/tree-prof/section-attr-2.c: Likewise.
* gcc.dg/tree-prof/section-attr-3.c: Likewise.


Modified:
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/testsuite/gcc.dg/tree-prof/section-attr-1.c
branches/gcc-7-branch/gcc/testsuite/gcc.dg/tree-prof/section-attr-2.c
branches/gcc-7-branch/gcc/testsuite/gcc.dg/tree-prof/section-attr-3.c

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

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78544

Iain Sandoe  changed:

   What|Removed |Added

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

--- Comment #9 from Iain Sandoe  ---
fixed for open branches.

[Bug target/78444] Wrong prologue stack alignment for implicit dtor on x86_64-darwin*

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78444

--- Comment #18 from Iain Sandoe  ---
Author: iains
Date: Mon Dec 24 12:47:58 2018
New Revision: 267406

URL: https://gcc.gnu.org/viewcvs?rev=267406&root=gcc&view=rev
Log:
Fix target/78444 on x86/Darwin.

2018-12-24  Iain Sandoe  

Backport from mainline
2018-12-06  Iain Sandoe  

PR target/78444
* config/i386/darwin.h (STACK_BOUNDARY): Remove macro.
* config/i386/i386.c (ix86_compute_frame_layout): Ensure at least 128b
stack alignment in non-leaf functions.


Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/config/i386/darwin.h
branches/gcc-7-branch/gcc/config/i386/i386.c

[Bug target/78444] Wrong prologue stack alignment for implicit dtor on x86_64-darwin*

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78444

Iain Sandoe  changed:

   What|Removed |Added

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

--- Comment #19 from Iain Sandoe  ---
fixed on open branches (folks who maintain earlier branches might want to apply
this locally).

[Bug libstdc++/64883] FAIL: 17_intro/headers/c++*/all_attributes.cc (test for excess errors) on x86_64-apple-darwin10

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64883

--- Comment #60 from Iain Sandoe  ---
Author: iains
Date: Mon Dec 24 13:01:04 2018
New Revision: 267407

URL: https://gcc.gnu.org/viewcvs?rev=267407&root=gcc&view=rev
Log:
Fix libstdc++/64883 for Darwin.

2018-12-24  Iain Sandoe  

Backport from mainline
2018-12-06  Jonathan Wakely  
Iain Sandoe  

PR libstdc++/64883
* testsuite/17_intro/headers/c++1998/all_attributes.cc: Don't test
always_inline on Darwin.
* testsuite/17_intro/headers/c++2011/all_attributes.cc: Likewise.
* testsuite/17_intro/headers/c++2014/all_attributes.cc: Likewise.
* testsuite/17_intro/headers/c++2017/all_attributes.cc: Likewise.
* testsuite/17_intro/headers/c++2020/all_attributes.cc: Likewise.


Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
   
branches/gcc-7-branch/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
   
branches/gcc-7-branch/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc
   
branches/gcc-7-branch/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc

[Bug libstdc++/64883] FAIL: 17_intro/headers/c++*/all_attributes.cc (test for excess errors) on x86_64-apple-darwin10

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64883

Iain Sandoe  changed:

   What|Removed |Added

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

--- Comment #61 from Iain Sandoe  ---
fixed on open branches.

[Bug libstdc++/70694] 50 experimental/filesystem/* failures on x86_64-apple-darwin10

2018-12-24 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70694

Dominique d'Humieres  changed:

   What|Removed |Added

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

--- Comment #13 from Dominique d'Humieres  ---
Thanks.

[Bug libstdc++/70694] 50 experimental/filesystem/* failures on x86_64-apple-darwin10

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70694

--- Comment #14 from Iain Sandoe  ---
Fixed for open branches, maintainers of earlier branches might want to apply
this locally.

[Bug c++/87380] Explicit instantations should use weak symbols on darwin

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87380

--- Comment #21 from Iain Sandoe  ---
Author: iains
Date: Mon Dec 24 13:17:28 2018
New Revision: 267409

URL: https://gcc.gnu.org/viewcvs?rev=267409&root=gcc&view=rev
Log:
Fix PR c++/87380 (ABI breakage) for Darwin.

2018-12-24  Iain Sandoe  

Backport from mainline
2018-12-06  Iain Sandoe  

PR c++/87380
* config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC) Remove, use the
default.
* config/rs6000/darwin7.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): New.


Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/config/darwin.h
branches/gcc-7-branch/gcc/config/rs6000/darwin7.h

[Bug c++/87380] Explicit instantations should use weak symbols on darwin

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87380

Iain Sandoe  changed:

   What|Removed |Added

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

--- Comment #22 from Iain Sandoe  ---
fixed on open branches, maintainers of earlier branches might wish to apply
this locally.

[Bug testsuite/67974] Missing gcc/testsuite/gcc.target/x86_64/abi/avx/asm-support-darwin.s file

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67974

Iain Sandoe  changed:

   What|Removed |Added

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

--- Comment #4 from Iain Sandoe  ---
Fixed on open branches.

[Bug testsuite/67974] Missing gcc/testsuite/gcc.target/x86_64/abi/avx/asm-support-darwin.s file

2018-12-24 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67974

--- Comment #3 from Iain Sandoe  ---
Author: iains
Date: Mon Dec 24 13:41:16 2018
New Revision: 267411

URL: https://gcc.gnu.org/viewcvs?rev=267411&root=gcc&view=rev
Log:
Fix target/67974 for Darwin by adding AVX asm shim.

2018-12-24  Iain Sandoe  

Backport from mainline
2018-12-24  Iain Sandoe  

PR testsuite/67974
* gcc.target/x86_64/abi/avx/asm-support-darwin.s: New.


Added:
   
branches/gcc-7-branch/gcc/testsuite/gcc.target/x86_64/abi/avx/asm-support-darwin.s
Modified:
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug c/88568] [8/9 Regression] 'dllimport' no longer implies 'extern' in C

2018-12-24 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88568

Alexander Monakov  changed:

   What|Removed |Added

 CC||amonakov at gcc dot gnu.org
  Known to work||5.3.0
Summary|GCC cannot dllimport|[8/9 Regression]
   |variables with undefined|'dllimport' no longer
   |types   |implies 'extern' in C
  Known to fail||8.1.0

--- Comment #2 from Alexander Monakov  ---
We document that attribute-dllimport implies extern storage class, so this
should be accepted similar to 'extern struct s var; struct s *ptr = &var;'.

MinGW-W64 GCC 5.3 used to accept this, so this is a regression. Unfortunately I
don't have other versions handy to check which releases regressed.

[Bug fortran/88511] passing allocatable character through two levels of procedure calls fails

2018-12-24 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88511

Dominique d'Humieres  changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-12-24
 Blocks||68241
 Ever confirmed|0   |1

--- Comment #2 from Dominique d'Humieres  ---
Confirmed for 8.2.0 and trunk (9.0). AFAICT form 7.3.0 down to at least 4.8
gfortran produces wrong code:

words = []


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68241
[Bug 68241] [meta-bug] [F03] Deferred-length character

[Bug fortran/88551] passing a portion of an array of a derived type that contains an allocatable component

2018-12-24 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88551

Dominique d'Humieres  changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-12-24
 Blocks||86754
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed from at least 4.8 up to trunk (9.0).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86754
[Bug 86754] [meta-bug] Memory leaks at run time

[Bug fortran/81509] Wrong compilation error: iand/ieor/ior + boz + -std=f2008

2018-12-24 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81509

--- Comment #7 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Mon Dec 24 18:26:25 2018
New Revision: 267415

URL: https://gcc.gnu.org/viewcvs?rev=267415&root=gcc&view=rev
Log:
2018-12-24  Steven G. Kargl  

PR fortran/45513
PR fortran/81509
* check.c: Rename function gfc_check_iand to gfc_check_iand_ieor_ior.
* check.c (boz_args_check): New function.  Check I and J not both BOZ.
(gfc_check_dshift,gfc_check_iand_ieor_ior, gfc_check_ishft,
 gfc_check_and, gfc_check_merge_bits): Use it.
* check.c (gfc_check_iand_ieor_ior): Force conversion of BOZ to kind
type of other agrument.  Remove silly GNU extension.
(gfc_check_ieor, gfc_check_ior): Delete now unused functions.
* intrinsic.c (add_functions): Use gfc_check_iand_ieor_ior. Wrap long
line.
* intrinsic.h: Rename gfc_check_iand to gfc_check_iand_ieor_ior.
Delete prototype for bool gfc_check_ieor and gfc_check_ior
* intrinsic.texi: Update documentation for boz-literal-constant.

2018-12-24  Steven G. Kargl  

PR fortran/45513
PR fortran/81509
* gfortran.dg/graphite/id-26.f03: Fix non-conforming use of IAND.
* gfortran.dg/pr81509_1.f90: New test.
* gfortran.dg/pr81509_2.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/pr81509_1.f90
trunk/gcc/testsuite/gfortran.dg/pr81509_2.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/check.c
trunk/gcc/fortran/intrinsic.c
trunk/gcc/fortran/intrinsic.h
trunk/gcc/fortran/intrinsic.texi
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/graphite/id-26.f03

[Bug fortran/45513] BOZ kinds differently handled, F2008: BOZ in bit intrinsics

2018-12-24 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45513

--- Comment #2 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Mon Dec 24 18:26:25 2018
New Revision: 267415

URL: https://gcc.gnu.org/viewcvs?rev=267415&root=gcc&view=rev
Log:
2018-12-24  Steven G. Kargl  

PR fortran/45513
PR fortran/81509
* check.c: Rename function gfc_check_iand to gfc_check_iand_ieor_ior.
* check.c (boz_args_check): New function.  Check I and J not both BOZ.
(gfc_check_dshift,gfc_check_iand_ieor_ior, gfc_check_ishft,
 gfc_check_and, gfc_check_merge_bits): Use it.
* check.c (gfc_check_iand_ieor_ior): Force conversion of BOZ to kind
type of other agrument.  Remove silly GNU extension.
(gfc_check_ieor, gfc_check_ior): Delete now unused functions.
* intrinsic.c (add_functions): Use gfc_check_iand_ieor_ior. Wrap long
line.
* intrinsic.h: Rename gfc_check_iand to gfc_check_iand_ieor_ior.
Delete prototype for bool gfc_check_ieor and gfc_check_ior
* intrinsic.texi: Update documentation for boz-literal-constant.

2018-12-24  Steven G. Kargl  

PR fortran/45513
PR fortran/81509
* gfortran.dg/graphite/id-26.f03: Fix non-conforming use of IAND.
* gfortran.dg/pr81509_1.f90: New test.
* gfortran.dg/pr81509_2.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/pr81509_1.f90
trunk/gcc/testsuite/gfortran.dg/pr81509_2.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/check.c
trunk/gcc/fortran/intrinsic.c
trunk/gcc/fortran/intrinsic.h
trunk/gcc/fortran/intrinsic.texi
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/graphite/id-26.f03

[Bug fortran/45513] BOZ kinds differently handled, F2008: BOZ in bit intrinsics

2018-12-24 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45513

kargl at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||kargl at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |kargl at gcc dot gnu.org
   Target Milestone|--- |9.0

--- Comment #3 from kargl at gcc dot gnu.org ---
Fixed on trunk.

[Bug fortran/81509] Wrong compilation error: iand/ieor/ior + boz + -std=f2008

2018-12-24 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81509

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |kargl at gcc dot gnu.org
   Target Milestone|--- |9.0

--- Comment #8 from kargl at gcc dot gnu.org ---
Fixed on trunk.

[Bug fortran/45513] BOZ kinds differently handled, F2008: BOZ in bit intrinsics

2018-12-24 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45513

Dominique d'Humieres  changed:

   What|Removed |Added

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

--- Comment #4 from Dominique d'Humieres  ---
> Fixed on trunk.

Really set to FIXED.

[Bug lto/87089] [9 regression] tree check: expected class 'type', have 'declaration' (namespace_decl) in type_with_linkage_p, at ipa-utils.h

2018-12-24 Thread dimhen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87089

Dmitry G. Dyachenko  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #5 from Dmitry G. Dyachenko  ---
r267346 PASS
r267418 FAIL

PR87089]$ g++ -flto -fPIC -DPIC -shared a.o b.o
b.ii:6:8: warning: type ‘struct ASN1C_CertificateListAssertion’ violates the
C++ One Definition Rule [-Wodr]
6 | struct ASN1C_CertificateListAssertion : a{} * b;
  |^
a.ii:2:8: note: a type with different bases is defined in another translation
unit
2 | struct ASN1C_CertificateListAssertion {
  |^
during IPA pass: pure-const
lto1: internal compiler error: tree check: expected class ‘type’, have
‘declaration’ (namespace_decl) in type_with_linkage_p, at ipa-utils.h:185
0x732d05 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
/home/dimhen/src/gcc_current/gcc/tree.c:9856
0xc1880a maybe_record_node
/home/dimhen/src/gcc_current/gcc/ipa-devirt.c:2531
0xc1ec81 possible_polymorphic_call_targets(tree_node*, long,
ipa_polymorphic_call_context, bool*, void**, bool)
/home/dimhen/src/gcc_current/gcc/ipa-devirt.c:3340
0xc55506 possible_polymorphic_call_targets(cgraph_edge*, bool*, void**, bool)
/home/dimhen/src/gcc_current/gcc/ipa-utils.h:118
0xc55506 walk_polymorphic_call_targets
/home/dimhen/src/gcc_current/gcc/ipa.c:183
0xc57cd4 symbol_table::remove_unreachable_nodes(_IO_FILE*)
/home/dimhen/src/gcc_current/gcc/ipa.c:427
0x98d642 read_cgraph_and_symbols
/home/dimhen/src/gcc_current/gcc/lto/lto.c:2978
0x98d642 lto_main()
/home/dimhen/src/gcc_current/gcc/lto/lto.c:3362
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.
/usr/local/gdb_current/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
[dimhen:dim PR87089]$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/gcc_current/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
Target: x86_64-pc-linux-gnu
Configured with: /home/dimhen/src/gcc_current/configure
--prefix=/usr/local/gcc_current --enable-checking=yes,df,fold,rtl,extra
--enable-languages=c,c++,lto --disable-multilib --enable-shared
--enable-threads=posix --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-linker-build-id
--with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl
--enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver
--enable-gnu-indirect-function --with-tune=native
Thread model: posix
gcc version 9.0.0 20181225 (experimental) [trunk revision 267418] (GCC)