~ubuntu-branches/ubuntu/lucid/gcj-4.3/lucid

« back to all changes in this revision

Viewing changes to debian/patches/pr38292.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-02-11 23:52:37 UTC
  • Revision ID: james.westby@ubuntu.com-20090211235237-7z3guvs732a558ey
Tags: 4.3.3-3ubuntu4
Upload as gcj-4.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh -e
 
2
 
 
3
# DP: Fix PR gcov-profile/38292, taken from the trunk
 
4
 
 
5
dir=
 
6
if [ $# -eq 3 -a "$2" = '-d' ]; then
 
7
    pdir="-d $3"
 
8
    dir="$3/"
 
9
elif [ $# -ne 1 ]; then
 
10
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
 
11
    exit 1
 
12
fi
 
13
case "$1" in
 
14
    -patch)
 
15
        patch $pdir -f --no-backup-if-mismatch -p0 < $0
 
16
        ;;
 
17
    -unpatch)
 
18
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
 
19
        ;;
 
20
    *)
 
21
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
 
22
        exit 1
 
23
esac
 
24
exit 0
 
25
 
 
26
gcc/
 
27
 
 
28
2009-02-04  Jakub Jelinek  <jakub@redhat.com>
 
29
 
 
30
        PR tree-optimization/38977
 
31
        PR gcov-profile/38292
 
32
        * calls.c (special_function_p): Disregard __builtin_
 
33
        prefix.
 
34
 
 
35
Index: gcc/calls.c
 
36
===================================================================
 
37
--- gcc/calls.c (revision 143936)
 
38
+++ gcc/calls.c (revision 143937)
 
39
@@ -498,10 +498,14 @@
 
40
               && ! strcmp (name, "__builtin_alloca"))))
 
41
        flags |= ECF_MAY_BE_ALLOCA;
 
42
 
 
43
-      /* Disregard prefix _, __ or __x.  */
 
44
+      /* Disregard prefix _, __, __x or __builtin_.  */
 
45
       if (name[0] == '_')
 
46
        {
 
47
-         if (name[1] == '_' && name[2] == 'x')
 
48
+         if (name[1] == '_'
 
49
+             && name[2] == 'b'
 
50
+             && !strncmp (name + 3, "uiltin_", 7))
 
51
+           tname += 10;
 
52
+         else if (name[1] == '_' && name[2] == 'x')
 
53
            tname += 3;
 
54
          else if (name[1] == '_')
 
55
            tname += 2;