[Bug c/87242] optimize -O2 incorrect output

2018-09-12 Thread minshall at acm dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87242

--- Comment #5 from Greg Minshall  ---
Created attachment 44684
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44684=edit
creduce'd (but, only partly) test case.

module_intern() is the function i creduce'd on (my creduce "interesting"
required module_intern() to be unchanged in the .c file, and emacs_intern() in
the -O2 .s file to be within epsilon of unchanged, as well as in the non-O2 .s
file to have a call to lisp_to_value()).

with -O2, it makes a couple of calls then returns 0, which is incorrect
behavior.

[Bug c/87242] optimize -O2 incorrect output

2018-09-12 Thread minshall at acm dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87242

--- Comment #4 from Greg Minshall  ---
hi.  sorry for the delay.  i'm creduce'ing and will upload.

[Bug c/87242] optimize -O2 incorrect output

2018-09-06 Thread minshall at acm dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87242

--- Comment #1 from Greg Minshall  ---
sorry, the attachment is too long (4MB).

is there any tool for whittling away the unnecessary bits, given a .c file --
i'd create by -E, though maybe the .i file would work? -- and a target function
-- i.e., the closure of all the references in the target function?

[Bug c/87242] New: optimize -O2 incorrect output

2018-09-06 Thread minshall at acm dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87242

Bug ID: 87242
   Summary: optimize -O2 incorrect output
   Product: gcc
   Version: 5.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: minshall at acm dot org
  Target Milestone: ---

Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
5.4.0-6ubuntu1~16.04.10' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-5 --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-libmpx --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-D' 'emacs' '-I' '.' '-I' '.' '-I'
'../lib' '-I' '../lib' '-pthread' '-isystem' '/usr/include/gtk-3.0' '-isystem'
'/usr/include/at-spi2-atk/2.0' '-isystem' '/usr/include/at-spi-2.0' '-isystem'
'/usr/include/dbus-1.0' '-isystem' '/usr/lib/x86_64-linux-gnu/dbus-1.0/include'
'-isystem' '/usr/include/gtk-3.0' '-isystem' '/usr/include/gio-unix-2.0/'
'-isystem' '/usr/include/mirclient' '-isystem' '/usr/include/mircore'
'-isystem' '/usr/include/mircookie' '-isystem' '/usr/include/cairo' '-isystem'
'/usr/include/pango-1.0' '-isystem' '/usr/include/harfbuzz' '-isystem'
'/usr/include/pango-1.0' '-isystem' '/usr/include/atk-1.0' '-isystem'
'/usr/include/cairo' '-isystem' '/usr/include/pixman-1' '-isystem'
'/usr/include/freetype2' '-isystem' '/usr/include/libpng12' '-isystem'
'/usr/include/gdk-pixbuf-2.0' '-isystem' '/usr/include/libpng12' '-isystem'
'/usr/include/glib-2.0' '-isystem' '/usr/lib/x86_64-linux-gnu/glib-2.0/include'
'-isystem' '/usr/include/freetype2' '-isystem' '/usr/include/libpng12'
'-isystem' '/usr/include/libxml2' '-pthread' '-isystem'
'/usr/include/webkitgtk-4.0' '-isystem' '/usr/include/gtk-3.0' '-isystem'
'/usr/include/at-spi2-atk/2.0' '-isystem' '/usr/include/at-spi-2.0' '-isystem'
'/usr/include/dbus-1.0' '-isystem' '/usr/lib/x86_64-linux-gnu/dbus-1.0/include'
'-isystem' '/usr/include/gtk-3.0' '-isystem' '/usr/include/gio-unix-2.0/'
'-isystem' '/usr/include/mirclient' '-isystem' '/usr/include/mircore'
'-isystem' '/usr/include/mircookie' '-isystem' '/usr/include/cairo' '-isystem'
'/usr/include/pango-1.0' '-isystem' '/usr/include/harfbuzz' '-isystem'
'/usr/include/pango-1.0' '-isystem' '/usr/include/atk-1.0' '-isystem'
'/usr/include/cairo' '-isystem' '/usr/include/pixman-1' '-isystem'
'/usr/include/freetype2' '-isystem' '/usr/include/libpng12' '-isystem'
'/usr/include/gdk-pixbuf-2.0' '-isystem' '/usr/include/libpng12' '-isystem'
'/usr/include/libsoup-2.4' '-isystem' '/usr/include/libxml2' '-isystem'
'/usr/include/webkitgtk-4.0' '-isystem' '/usr/include/glib-2.0' '-isystem'
'/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-isystem'
'/usr/include/glib-2.0' '-isystem' '/usr/lib/x86_64-linux-gnu/glib-2.0/include'
'-isystem' '/usr/include/glib-2.0' '-isystem'
'/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-isystem'
'/usr/include/freetype2' '-isystem' '/usr/include/freetype2' '-MMD' '-MF'
'deps/emacs-module.d' '-MP' '-isystem' '/usr/include/p11-kit-1' '-fno-common'
'-Wabi' '-Waddress' '-Waggressive-loop-optimizations' '-Wall' '-Wattributes'
'-Wbool-compare' '-Wbuiltin-macro-redefined' '-Wcast-align' '-Wchar-subscripts'
'-Wchkp' '-Wclobbered' '-Wcomment' '-Wcoverage-mismatch' '-Wcpp' '-Wdate-time'
'-Wdeprecated' '-Wdeprecated-declarations' '-Wdesignated-init'
'-Wdisabled-optimization' '-Wdiscarded-array-qualifiers'
'-Wdiscarded-qualifiers' '-Wdiv-by-zero' '-Wdouble-promotion' '-Wempty-body'
'-Wendif-labels' '-Wenum-compare' '-Wextra' '-Wformat-contains-nul'
'-Wformat-extra-args' '-Wformat-security' '-Wformat-signedness' '-Wformat-y2k'
'-Wformat-zero-length' '-Wfree-nonheap-object' '-Wignored-qualifiers'
'-Wimplicit' '-Wimplicit-function-declaration' '-Wimplicit-int'
'-Wincompatible-pointer-types' '-Winit-self' '-Wint-conversion'
'-Wint