[Bug bootstrap/92484] In tree build of ISL 0.22 fails: requires C++11

2019-11-28 Thread irfanadilovic at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92484

Irfan Adilovic  changed:

   What|Removed |Added

 CC||irfanadilovic at gmail dot com

--- Comment #6 from Irfan Adilovic  ---
Here's my take on this.

GCC configure.ac has this:

# When bootstrapping with GCC, build stage 1 in C++98 mode to ensure that a
# C++98 compiler can still start the bootstrap.
if test "$enable_bootstrap:$GXX" = "yes:yes"; then
  CXX="$CXX -std=gnu++98"
fi

which results in the CXX being defined as 'g++ -std=gnu++98 -std=c++11' in ISL
Makefiles (CXX propagated recursively). However this is *not* the problem, as
this CXX definition works just fine on C++11 source code.

This leads me to conclude that GCC must be using some kind of make variable
override mechanism, like invoking the ISL make with `make CXX="$CXX" all` which
leads to the complete override of CXX in ISL Makefiles, leaving out the
-std=c++11 flag, and leading to compilation failures of C++11 code in ISL.

Moreover, to reinforce this conclusion, running a plain 'make' in ISL build
subdir, right after the top-level make has failed, works just fine. It is only
when invoked recursively through toplevel Makefile, that it fails as described.

---

By invoking top-level make as 'make V=1 SHELL="/bin/bash -vx"' I've been able
to isolate the full make command used to build ISL (warning, it's a handful):

make "DESTDIR=" "RPATH_ENVVAR=LD_LIBRARY_PATH"
"TARGET_SUBDIR=x86_64-redhat-linux" "bindir=/usr/local/gcc-9.2.0/bin"
"datadir=/usr/local/gcc-9.2.0/share" "exec_prefix=/usr/local/gcc-9.2.0"
"includedir=/usr/local/gcc-9.2.0/include"
"datarootdir=/usr/local/gcc-9.2.0/share"
"docdir=/usr/local/gcc-9.2.0/share/doc/"
"infodir=/usr/local/gcc-9.2.0/share/info"
"pdfdir=/usr/local/gcc-9.2.0/share/doc/"
"htmldir=/usr/local/gcc-9.2.0/share/doc/" "libdir=/usr/local/gcc-9.2.0/lib"
"libexecdir=/usr/local/gcc-9.2.0/libexec" "lispdir="
"localstatedir=/usr/local/gcc-9.2.0/var"
"mandir=/usr/local/gcc-9.2.0/share/man" "oldincludedir=/usr/include"
"prefix=/usr/local/gcc-9.2.0" "sbindir=/usr/local/gcc-9.2.0/sbin"
"sharedstatedir=/usr/local/gcc-9.2.0/com" "sysconfdir=/usr/local/gcc-9.2.0/etc"
"tooldir=/usr/local/gcc-9.2.0/x86_64-redhat-linux"
"build_tooldir=/usr/local/gcc-9.2.0/x86_64-redhat-linux"
"target_alias=x86_64-redhat-linux" "AWK=gawk" "BISON=bison" "CC_FOR_BUILD=gcc"
"CFLAGS_FOR_BUILD=-g -O2" "CXX_FOR_BUILD=g++ -std=gnu++98" "EXPECT=expect"
"FLEX=flex" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m
644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c"
"LDFLAGS_FOR_BUILD=" "LEX=flex" "M4=m4" "MAKE=make" "RUNTEST=runtest"
"RUNTESTFLAGS=" "SED=/bin/sed" "SHELL=/bin/bash -vx" "YACC=bison -y" "`echo
'ADAFLAGS=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "ADA_CFLAGS=" "AR_FLAGS=rc"
"`echo 'BOOT_ADAFLAGS=-gnatpg' | sed -e s'/[^=][^=]*=$/XFOO=/'`"
"BOOT_CFLAGS=-g -O2" "BOOT_LDFLAGS=" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2"
"LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCXXFLAGS=-g -O2 -fno-implicit-templates"
"STAGE1_CHECKING=--enable-checking=release,types" "STAGE1_LANGUAGES=c,c++,lto"
"GNATBIND=no" "GNATMAKE=no" "GDC=@GDC@" "GDCFLAGS=-g -O2" "AR_FOR_TARGET=ar"
"AS_FOR_TARGET=as" "CC_FOR_TARGET=/root/gcc/gcc/build/./gcc/xgcc
-B/root/gcc/gcc/build/./gcc/" "CFLAGS_FOR_TARGET=-g -O2" "CPPFLAGS_FOR_TARGET="
"CXXFLAGS_FOR_TARGET=-g -O2 -D_GNU_SOURCE" "DLLTOOL_FOR_TARGET=dlltool"
"FLAGS_FOR_TARGET=-B/usr/local/gcc-9.2.0/x86_64-redhat-linux/bin/
-B/usr/local/gcc-9.2.0/x86_64-redhat-linux/lib/ -isystem
/usr/local/gcc-9.2.0/x86_64-redhat-linux/include -isystem
/usr/local/gcc-9.2.0/x86_64-redhat-linux/sys-include" "GFORTRAN_FOR_TARGET="
"GOC_FOR_TARGET=" "GOCFLAGS_FOR_TARGET=-O2 -g" "GDC_FOR_TARGET=@GDC@"
"GDCFLAGS_FOR_TARGET=-O2 -g" "LD_FOR_TARGET=ld" "LIPO_FOR_TARGET=lipo"
"LDFLAGS_FOR_TARGET=" "LIBCFLAGS_FOR_TARGET=-g -O2" "LIBCXXFLAGS_FOR_TARGET=-g
-O2 -D_GNU_SOURCE -fno-implicit-templates" "NM_FOR_TARGET=nm"
"OBJDUMP_FOR_TARGET=objdump" "OBJCOPY_FOR_TARGET="

[Bug libstdc++/81522] New: c++17/old-abi/cygwin empty stringstream invalid memory access

2017-07-23 Thread irfanadilovic at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81522

Bug ID: 81522
   Summary: c++17/old-abi/cygwin empty stringstream invalid memory
access
   Product: gcc
   Version: 7.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: irfanadilovic at gmail dot com
  Target Milestone: ---
 Build: x86_64-pc-cygwin

This trivial program:

#include 
int main() {
std::stringstream os; // same with ("") or (std::string())
os.str();
return 0;
}

causes an invalid memory access with gcc 7.1.0 (compiled from source), but only
on Cygwin in c++17 mode with old ABI, and only if the stringstream is
constructed empty. Changing any of those parameters no longer causes the issue.

Thread 1 "string" received signal SIGABRT, Aborted.
0x0001004018a0 in __gnu_cxx::new_allocator::deallocate (this=0x6,
__p=0x3e803fc )
at /usr/local/gcc-7.1.0/include/c++/7.1.0/ext/new_allocator.h:125
125 ::operator delete(__p);
(gdb) bt
#0  0x0001004018a0 in __gnu_cxx::new_allocator::deallocate (this=0x6,
__p=0x3e803fc )
at /usr/local/gcc-7.1.0/include/c++/7.1.0/ext/new_allocator.h:125
#1  0x0001800b25d2 in CreateEventW () from /usr/bin/cygwin1.dll
#2  0x0130 in ?? ()

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/gcc-7.1.0/libexec/gcc/x86_64-pc-cygwin/7.1.0/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: ../configure --prefix=/usr/local/gcc-7.1.0
--enable-threads=posix --enable-checking=release --enable-languages=c,c++
--build=x86_64-pc-cygwin --disable-multilib
--with-default-libstdcxx-abi=gcc4-compatible
Thread model: posix
gcc version 7.1.0 (GCC)

Sample program compiled with:

$ g++  -std=c++17 -D_GLIBCXX_USE_CXX11_ABI=0 -ggdb -O0   string.cc   -o string

[Bug c++/67658] [concepts] invalid code with constrained concepts compiles

2016-03-09 Thread irfanadilovic at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67658

Irfan Adilovic  changed:

   What|Removed |Added

 CC||irfanadilovic at gmail dot com

--- Comment #1 from Irfan Adilovic  ---
The 20160306 snapshot exhibits the same behavior, which is explicitly commented
as being forbidden at the end of [dcl.spec.concept] paragraph 6.

[Bug libstdc++/69266] bootstrap failure undefined reference to `std::basic_ios<char, std::char_traits >::

2016-01-25 Thread irfanadilovic at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69266

--- Comment #8 from Irfan Adilovic  ---
Yes, this is a duplicate of bug 66655

[Bug libstdc++/69266] bootstrap failure undefined reference to `std::basic_ios<char, std::char_traits >::

2016-01-22 Thread irfanadilovic at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69266

Irfan Adilovic  changed:

   What|Removed |Added

 CC||irfanadilovic at gmail dot com

--- Comment #5 from Irfan Adilovic  ---
I can confirm that this still happens with the 20160117 snapshot. I've tried
tprince's suggestion to --disable-libstdcxx but this first leads to a
-Werror=pedantic error in isl/include/isl/ctx.h:83 due to a trailing comma in

typedef enum {
isl_stat_error = -1,
isl_stat_ok = 0, // <-- here
} isl_stat;

ISL was downloaded via contrib/download_prerequisites. Fixing that leads to a
make error when "Comparing stages 2 and 3":

Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Bootstrap comparison failure!
gmp/mpf/eq.o differs
... about 60 such lines
gmp/randmui.o differs
Makefile:20907: recipe for target 'compare' failed

Is there a snapshot known to have worked on cygwin to perform a bisect?