rpms/sdcc/devel sdcc-2.9.0-r5508-fix-bug2805333.diff, NONE, 1.1 sdcc.spec, 1.18, 1.19
konradm
konradm at fedoraproject.org
Fri Sep 11 14:17:35 UTC 2009
Author: konradm
Update of /cvs/pkgs/rpms/sdcc/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10257
Modified Files:
sdcc.spec
Added Files:
sdcc-2.9.0-r5508-fix-bug2805333.diff
Log Message:
* Fri Sep 11 2009 Conrad Meyer <konrad at tylerc.org> - 2.9.0-5
- Fix a bug with single-bit types, logical NOT, and casting to char
(I'm fuzzy on the details) that was reported by a Fedora user with the
r5508 patch from upstream.
sdcc-2.9.0-r5508-fix-bug2805333.diff:
ChangeLog | 6 ++++++
src/mcs51/gen.c | 7 +++----
support/regression/tests/bug2805333.c | 22 ++++++++++++++++++++++
3 files changed, 31 insertions(+), 4 deletions(-)
--- NEW FILE sdcc-2.9.0-r5508-fix-bug2805333.diff ---
Index: sdcc/src/mcs51/gen.c
===================================================================
--- sdcc/src/mcs51/gen.c (revision 5507)
+++ sdcc/src/mcs51/gen.c (working copy)
@@ -1413,7 +1413,8 @@
return aop->aopu.aop_reg[offset]->name;
case AOP_CRY:
- emitcode ("mov", "c,%s", aop->aopu.aop_dir);
+ if (!IS_OP_RUONLY (oper))
+ emitcode ("mov", "c,%s", aop->aopu.aop_dir);
emitcode ("clr", "a");
emitcode ("rlc", "a");
return (dname ? "acc" : "a");
@@ -10052,7 +10053,7 @@
ifxCond = genUnpackBits (result, rname, POINTER, ifx);
else
{
- /* we have can just get the values */
+ /* we can just get the values */
int size = AOP_SIZE (result);
int offset = 0;
@@ -10060,7 +10061,6 @@
{
if (ifx || IS_AOP_PREG (result) || AOP_TYPE (result) == AOP_STK)
{
-
emitcode ("mov", "a,@%s", rname);
if (!ifx)
aopPut (result, "a", offset);
@@ -10483,7 +10483,6 @@
the pointer values */
switch (p_type)
{
-
case POINTER:
case IPOINTER:
genNearPointerGet (left, result, ic, pi, ifx);
Index: sdcc/ChangeLog
===================================================================
--- sdcc/ChangeLog (revision 5507)
+++ sdcc/ChangeLog (working copy)
@@ -1,5 +1,11 @@
2009-08-29 Maarten Brock <sourceforge.brock AT dse.nl>
+ * src/mcs51/gen.c (aopGet): applied patch 2837100 to fix bug 2805333
+ * support/regression/tests/bug2805333.c: new, added,
+ thanks Ruud van Silfhout
+
+2009-08-29 Maarten Brock <sourceforge.brock AT dse.nl>
+
* device/include/ctype.h: removed _REENTRANT as they are already with
--stack-auto, optimized _tolower and _toupper with char casts
* device/include/string.h,
Index: sdcc/support/regression/tests/bug2805333.c
===================================================================
--- sdcc/support/regression/tests/bug2805333.c (revision 0)
+++ sdcc/support/regression/tests/bug2805333.c (revision 5508)
@@ -0,0 +1,22 @@
+/*
+ bug2805333.c
+*/
+
+#include <testfwk.h>
+#include <stdbool.h>
+
+#ifndef BOOL
+#define BOOL bool
+#endif
+
+void g(char c)
+{
+ c;
+}
+
+BOOL b;
+
+void test_bug(void)
+{
+ g(!b); /* Causes SDCC 2.9.0 to segfault.. */
+}
Property changes on: sdcc/support/regression/tests/bug2805333.c
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Index: sdcc.spec
===================================================================
RCS file: /cvs/pkgs/rpms/sdcc/devel/sdcc.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -p -r1.18 -r1.19
--- sdcc.spec 27 Jul 2009 04:04:33 -0000 1.18
+++ sdcc.spec 11 Sep 2009 14:17:35 -0000 1.19
@@ -1,6 +1,6 @@
Name: sdcc
Version: 2.9.0
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Small Device C Compiler
Group: Applications/Engineering
License: GPLv2+
@@ -10,6 +10,7 @@ Source1: README.fedora
Patch0: sdcc-2.9.0-patch-out-getline.diff
Patch1: sdcc-2.9.0-configure.diff
Patch2: sdcc-2.9.0-r5476-fix-doublefree.diff
+Patch3: sdcc-2.9.0-r5508-fix-bug2805333.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf
@@ -56,6 +57,7 @@ Emacs extensions for SDCC.
%patch0 -p1
%patch1 -p1
%patch2 -p2
+%patch3 -p1
find -name '*.[ch]' -exec chmod -x '{}' \;
# Extract %%__os_install_post into os_install_post~
@@ -135,6 +137,11 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Sep 11 2009 Conrad Meyer <konrad at tylerc.org> - 2.9.0-5
+- Fix a bug with single-bit types, logical NOT, and casting to char
+ (I'm fuzzy on the details) that was reported by a Fedora user with the
+ r5508 patch from upstream.
+
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.9.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
More information about the fedora-extras-commits
mailing list