This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/27363] ARM gcc 4.1 optimization bug

------- Comment #7 from dirk dot behme at googlemail dot com  2006-06-12 15:34 -------

Until a fix for this bug is found, there are two possible workarounds:

- Compile kernels sound system as modules and compile these modules with -O1
instead of default -Os or -O2 (e.g. by changing main Makefile).

- Use this patch from Fengwei Yin <> (then -Os or -O2
should work):

-- linux/include/sound/pcm_params.h    2005-03-02 09:31:53.000000000 +0800
+++ linux-ok/include/sound/pcm_params.h 2006-06-08 09:57:11.000000000 +0800
@@ -196,6 +196,11 @@ INLINE int snd_mask_refine(snd_mask_t *m
       snd_mask_t old;
       snd_mask_copy(&old, mask);
+       /*
+        * add the barrier to fix the optimization
+        * error of GCC 4.1
+       */
+       mb();
       snd_mask_intersect(mask, v);
       if (snd_mask_empty(mask))
               return -EINVAL; 

Note that this is only a workaround. It will drop the Alsa subsystem


dirk dot behme at googlemail dot com changed:

           What    |Removed                     |Added
                 CC|                            |dirk dot behme at googlemail
                   |                            |dot com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]