lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Fwd: How did this unit test fail?


From: Greg Chicares
Subject: Re: [lmi] Fwd: How did this unit test fail?
Date: Wed, 28 Mar 2018 12:27:18 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 2018-03-27 11:50, Vadim Zeitlin wrote:
[...]
>  So this is clearly a bug in gcc, although I don't know if it's a "real"
> bug or some weird miscompilation of Debian MinGW package or a result of one
> of Debian patches -- although I don't see anything remotely relevant in
> https://anonscm.debian.org/cgit/collab-maint/gcc-mingw-w64.git/tree/debian/patches

I read all of them, and it seems like the problem _must_ be this patch:

https://anonscm.debian.org/cgit/collab-maint/gcc-mingw-w64.git/tree/debian/patches/cpp-intrinsics.patch

but it seems like the problem _cannot_ be that patch, because the changes
seem to be so simple and obviously correct...or are they? For example, on
lines 410-436:

===================================================================
--- gcc.orig/gcc/config/i386/wmmintrin.h        2009-04-12 20:40:03.000000000 
+0200
+++ gcc/gcc/config/i386/wmmintrin.h     2010-03-01 18:17:12.967902500 +0100
@@ -34,6 +34,10 @@
 # error "AES/PCLMUL instructions not enabled"
 #else
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* AES */
 
 #ifdef __AES__
@@ -115,6 +119,10 @@ _mm_clmulepi64_si128 (__m128i __X, __m12
 #endif
 #endif  /* __PCLMUL__  */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __AES__/__PCLMUL__ */
 
 #endif /* _WMMINTRIN_H_INCLUDED */
Index: gcc/gcc/config/i386/xmmintrin.h
===================================================================

there isn't enough context to verify which #ifdef each #endif
corresponds to--in particular, if "#ifdef __AES__" corresponds to
the last "#endif /* __AES__/__PCLMUL__ */", then the 'extern "C" {'
might not match the closing "}".

That seems far-fetched: if it's wrong, it should be a syntax error.
Still, is there an easy way to examine this, without cloning the
whole git repository? AFAICS, that debian.org repository has only
a '--unified=3' patch, but not the original sources. And if I look
here:

https://github.com/gcc-mirror/gcc/blob/master/gcc/config/i386/wmmintrin.h

I see a rather different file. It's copyright 2018, whereas this
patch says "Last-Update: 2011-07-31".

Or am I just climbing down a rabbit hole that leads nowhere useful?

>  For now I've opened https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85091 but
> I'm not sure if anybody is going to look at it, the bug report seems far
> too crazy to be real

Already thirty-one comments, the last of which says:
| It's super-weird issue



reply via email to

[Prev in Thread] Current Thread [Next in Thread]