summaryrefslogtreecommitdiff
path: root/recipes/gcc/gcc-4.4.2/debian/svn-gdc-updates.dpatch
blob: 728209e51dd8d0f2f8b970019a35d43b291f9d6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#! /bin/sh -e

# svn-gdc-updates.dpatch by Arthur Loiret <arthur.loiret@gmail.com>
# DP: SVN updates from the gdc branch up to 20070831.

dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
    pdir="-d $3"
    dir="$3/"
elif [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch)
        patch $pdir -f --no-backup-if-mismatch -p0 < $0
        #cd ${dir}gcc && autoconf
        ;;
    -unpatch)
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
        #rm ${dir}gcc/configure
        ;;
    *)
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
        exit 1
esac
exit 0


diff -ruN gcc/d/ChangeLog gcc/d/ChangeLog
--- gcc/d/ChangeLog	2007-08-26 22:34:22.000000000 +0200
+++ gcc/d/ChangeLog	2007-09-02 19:33:43.000000000 +0200
@@ -1,3 +1,20 @@
+2007-08-31  David Friedman  <dvdfrdmn@users.sf.net>
+
+	* d-objfile.cc (outdata): Do not set TREE_CONSTANT on initializers
+	(Bugzilla 1453)
+
+2007-08-29  David Friedman  <dvdfrdmn@users.sf.net>
+
+	* d-decls.cc (uniqueName): Allow multiple static declaration with
+	the same name if in a function. (SF 1783085)
+
+2007-08-28  David Friedman  <dvdfrdmn@users.sf.net>
+
+	* d-codegen.cc (call): Use CommaExp correctly. (Bugzilla 1443)
+
+	* dmd/todt.c (createTsarrayDt): Don't take quadratic time to build
+	the initializer. (Bugzilla 1440)
+
 2007-08-22  David Friedman  <dvdfrdmn@users.sf.net>
 
 	Release GDC 0.24
diff -ruN gcc/d/d-codegen.cc gcc/d/d-codegen.cc
--- gcc/d/d-codegen.cc	2007-08-26 22:34:22.000000000 +0200
+++ gcc/d/d-codegen.cc	2007-09-02 19:33:43.000000000 +0200
@@ -780,10 +780,12 @@
     if (expr->op == TOKcomma)
     {
 	CommaExp * ce = (CommaExp *) expr;
+	expr = ce->e2;
+	
 	VarExp * ve;
-	expr = ce->e1;
-	gcc_assert( ce->e2->op == TOKvar &&
-	    ((VarExp *) ce->e2)->var->isFuncDeclaration() );
+	gcc_assert( ce->e2->op == TOKvar );
+	ve = (VarExp *) ce->e2;
+	gcc_assert(ve->var->isFuncDeclaration() && ! ve->var->needThis());
     }
     
     Type* t = expr->type->toBasetype();
diff -ruN gcc/d/d-decls.cc gcc/d/d-decls.cc
--- gcc/d/d-decls.cc	2007-08-26 22:34:22.000000000 +0200
+++ gcc/d/d-decls.cc	2007-09-02 19:33:43.000000000 +0200
@@ -137,10 +137,17 @@
     FuncDeclaration * f = d->isFuncDeclaration();
     VarDeclaration * v = d->isVarDeclaration();
 
-    if (d->protection == PROTprivate &&
-	!(f && ! f->fbody) &&
+    /* Check cases for which it is okay to have a duplicate symbol name.
+       Otherwise, duplicate names are an error and the condition will
+       be caught by the assembler. */
+    if (!(f && ! f->fbody) &&
 	!(v && (v->storage_class & STCextern)) &&
-	(!p || p->isModule()))
+	(
+	 // Static declarations in different scope statements
+	 (p && p->isFuncDeclaration()) ||
+
+	 // Top-level duplicate names are okay if private.
+	 ((!p || p->isModule()) && d->protection == PROTprivate) ))
     {
 	StringValue * sv;
 
diff -ruN gcc/d/dmd/todt.c gcc/d/dmd/todt.c
--- gcc/d/dmd/todt.c	2007-08-26 22:34:22.000000000 +0200
+++ gcc/d/dmd/todt.c	2007-09-02 19:33:43.000000000 +0200
@@ -73,17 +73,18 @@
 
 	target_size_t dim = tsa->dim->toInteger();
 	dt_t * adt = NULL;
+	dt_t ** padt = & adt;
 	
 	if (eoa_size * dim == eoa_size)
 	{
 	    for (target_size_t i = 0; i < dim; i++)
-		dtcontainer(& adt, NULL, elem_or_all);
+		padt = dtcontainer(padt, NULL, elem_or_all);
 	}
 	else
 	{
 	    assert(tsa->size(0) % eoa_size == 0);
 	    for (target_size_t i = 0; i < dim; i++)
-		dtcontainer(& adt, NULL,
+		padt = dtcontainer(padt, NULL,
 		    createTsarrayDt(elem_or_all, tsa->next));
 	}
 	dt_t * fdt = NULL;
diff -ruN gcc/d/d-objfile.cc gcc/d/d-objfile.cc
--- gcc/d/d-objfile.cc	2007-08-26 22:34:22.000000000 +0200
+++ gcc/d/d-objfile.cc	2007-09-02 19:33:43.000000000 +0200
@@ -954,11 +954,8 @@
 
     assert( t );
 
-    if (sym->Sdt && DECL_INITIAL( t ) == NULL_TREE) {
-	tree ini = dt2tree( sym->Sdt );
-	TREE_CONSTANT( ini ) = TREE_CONSTANT( t );
-	DECL_INITIAL( t ) = ini;
-    }
+    if (sym->Sdt && DECL_INITIAL( t ) == NULL_TREE)
+	DECL_INITIAL( t ) = dt2tree( sym->Sdt );
 
     if (! g.ofile->shouldEmit(sym))
 	return;