This is the mail archive of the gcc@gcc.gnu.org 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]

Unaligned double


Hi.

The following used to work on 2.95.x and fails on 3.0.x for PA 1.0
semantics:

class ua_double
{
     double l;
public:
    ua_double &operator =(double l_) { l = l_; return *this; };
    operator double () { return l; };
}__attribute__((aligned(2), packed));

void addHoldFile(void);

void addHoldFile ()
{
    double dpAmount;
    struct
    {
       long lVal;
       ua_double dpAmount;
    } saRec;

    dpAmount = saRec.dpAmount;
}

...

(insn 28 26 30 (set (subreg:SI (reg:DF 96) 1)
         (reg:SI 102)) 68 {*pa.md:2088} (nil)
     (expr_list:REG_DEAD (reg:SI 102)
         (nil)))

which becomes:

(insn 68 28 65 (set (reg:SI 43 %fr9R [42])
         (reg:SI 21 %r21)) 68 {*pa.md:2088} (nil)
     (nil))

[snip]

test.cc: In member function `ua_double::operator double()':
test.cc:6: Insn does not satisfy its constraints:

(insn 68 28 30 (set (reg:SI 43 %fr9R [42])
         (reg:SI 21 %r21)) 68 {*pa.md:2088} (nil)
     (nil))
test.cc:6: Internal compiler error in extract_constrain_insn_cached, at recog.c
    :2133
Please submit a full bug report,

Note that I am using PA 1.0 as the architecture and %fr9R should not be
used. In fact:

regno: 43, not_usable: 1, used_by_other_reload: 0, mode: DF, mode_ok: 0

I can not figure out how or where %fr9R is getting emitted.

Any clues would be appreciated.

Regards,


M.
--
Mark Klein                                    DIS International, Ltd.
http://www.dis.com                            415-892-8400
PGP Public Key Available
--


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