I can confirm the Bug.  Following the discussion in
http://forum.canardpc.com/threads/83443-Memtest86-V5.01-crashes-with-gcc-4.7.2-or-later
reducing the optimization from -O1 to -O0 and a small patch to the
file io.h make memtest86 work again.

I suggest to apply the patch as a workaround until the gcc 4.9 is
fixed.  The patch is attached.

Jose Calhariz

-- 
--

Compositores são lembrados pela posteridade, enquanto homens de negócios são 
esquecidos

--Gordon Getty, bilionário que res
Description: Disable optimizations
 Due to a bug in gcc 4.9 the optmizations are disabled.
 .
 memtest86+ (5.01-2~cal1) UNRELEASED; urgency=low
 .
   * Non-maintainer upload.
   * Binary rebuild
Author: Jose M Calhariz <jose.calha...@netvisao.pt>
Bug: 
http://forum.canardpc.com/threads/83443-Memtest86-V5.01-crashes-with-gcc-4.7.2-or-later
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=753627

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

Index: memtest86+-5.01/Makefile
===================================================================
--- memtest86+-5.01.orig/Makefile       2014-08-30 23:41:43.000000000 +0100
+++ memtest86+-5.01/Makefile    2014-08-30 23:41:43.000000000 +0100
@@ -12,7 +12,7 @@ FDISK=/dev/fd0
 AS=as -32
 CC=gcc
 
-CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \
+CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
        -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector 
 
 # This reverts a change introduced with recent binutils (post
Index: memtest86+-5.01/io.h
===================================================================
--- memtest86+-5.01.orig/io.h   2014-08-30 23:52:55.651467144 +0100
+++ memtest86+-5.01/io.h        2014-08-30 23:53:16.675813199 +0100
@@ -31,7 +31,7 @@
  */
 
 #define __OUT1(s,x) \
-extern inline void __out##s(unsigned x value, unsigned short port) {
+static inline void __out##s(unsigned x value, unsigned short port) {
 
 #define __OUT2(s,s1,s2) \
 __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1"
@@ -43,7 +43,7 @@ __OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a"
 __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; }
 
 #define __IN1(s) \
-extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
+static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
 
 #define __IN2(s,s1,s2) \
 __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0"

Attachment: signature.asc
Description: Digital signature

Reply via email to