avr-libc-commit
[Top][All Lists]
Advanced

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

[avr-libc-commit] [2307] Fix for bug #37778: _MemoryBarrier() in cpufunc


From: Dmitry Xmelkov
Subject: [avr-libc-commit] [2307] Fix for bug #37778: _MemoryBarrier() in cpufunc.h error on compile
Date: Sat, 26 Jan 2013 22:39:58 +0000

Revision: 2307
          http://svn.sv.gnu.org/viewvc/?view=rev&root=avr-libc&revision=2307
Author:   dmix
Date:     2013-01-26 22:39:58 +0000 (Sat, 26 Jan 2013)
Log Message:
-----------
Fix for bug #37778: _MemoryBarrier() in cpufunc.h error on compile

* include/avr/cpufunc.h: Place empty string for asm body. This is
needed for older GCC versions.
* tests/simulate/regression/bug-37778.c: New file.
* NEWS: Add to fixed bug list.

Ticket Links:
------------
    http://savannah.gnu.org/bugs/?37778

Modified Paths:
--------------
    trunk/avr-libc/ChangeLog
    trunk/avr-libc/NEWS
    trunk/avr-libc/include/avr/cpufunc.h

Added Paths:
-----------
    trunk/avr-libc/tests/simulate/regression/bug-37778.c

Modified: trunk/avr-libc/ChangeLog
===================================================================
--- trunk/avr-libc/ChangeLog    2013-01-10 14:23:48 UTC (rev 2306)
+++ trunk/avr-libc/ChangeLog    2013-01-26 22:39:58 UTC (rev 2307)
@@ -1,3 +1,11 @@
+2013-01-27  Dmitry Xmelkov  <address@hidden>
+
+       Fix for bug #37778: _MemoryBarrier() in cpufunc.h error on compile
+       * include/avr/cpufunc.h: Place empty string for asm body. This is
+       needed for older GCC versions.
+       * tests/simulate/regression/bug-37778.c: New file.
+       * NEWS: Add to fixed bug list.
+
 2013-01-10  Joerg Wunsch <address@hidden>
 
        Submitted by Senthil Kumar Selvaraj:

Modified: trunk/avr-libc/NEWS
===================================================================
--- trunk/avr-libc/NEWS 2013-01-10 14:23:48 UTC (rev 2306)
+++ trunk/avr-libc/NEWS 2013-01-26 22:39:58 UTC (rev 2307)
@@ -9,6 +9,7 @@
   [#35539] stdlib.h does not provide EXIT_SUCCESS et al.
   [#36454] string.h: Error for long long in C90
   [#36581] avr-libc: pgmspace.h is not ANSI compliant
+  [#37778] _MemoryBarrier() in cpufunc.h error on compile
   [no-id]  XXX_vect_num not consistent io90pwmx.h, iousbxx6_7.h
 
 * New devices supported:

Modified: trunk/avr-libc/include/avr/cpufunc.h
===================================================================
--- trunk/avr-libc/include/avr/cpufunc.h        2013-01-10 14:23:48 UTC (rev 
2306)
+++ trunk/avr-libc/include/avr/cpufunc.h        2013-01-26 22:39:58 UTC (rev 
2307)
@@ -77,7 +77,7 @@
 */
 #define _MemoryBarrier()
 #else  /* real code */
-#define _MemoryBarrier() __asm__ __volatile__(:::"memory")
+#define _MemoryBarrier() __asm__ __volatile__("":::"memory")
 #endif  /* __DOXYGEN__ */
 
 #endif /* _AVR_CPUFUNC_H_ */

Added: trunk/avr-libc/tests/simulate/regression/bug-37778.c
===================================================================
--- trunk/avr-libc/tests/simulate/regression/bug-37778.c                        
        (rev 0)
+++ trunk/avr-libc/tests/simulate/regression/bug-37778.c        2013-01-26 
22:39:58 UTC (rev 2307)
@@ -0,0 +1,48 @@
+/* Copyright (c) 2013  Dmitry Xmelkov
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+   * Neither the name of the copyright holders nor the names of
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* bug #37778: _MemoryBarrier() in cpufunc.h error on compile
+   $Id$        */
+
+#ifndef __AVR__
+
+/* Omit the test.      */
+int main ()    { return 0; }
+
+#else
+
+#include <avr/cpufunc.h>
+
+int main ()
+{
+    _MemoryBarrier ();
+    return 0;
+}
+
+#endif /* __AVR__ */


Property changes on: trunk/avr-libc/tests/simulate/regression/bug-37778.c
___________________________________________________________________
Added: svn:keywords
   + Author Id Date




reply via email to

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