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

c++/2541: Wild store in finish_builtin_type



>Number:         2541
>Category:       c++
>Synopsis:       Wild store in finish_builtin_type
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 12 04:26:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     hpenner@de.ibm.bom
>Release:        gcc-2.95.2
>Organization:
>Environment:
Hit on S390 64 bit, but problem also on any system
>Description:
The conversion from 0 to a pointer to member function das
crash when building the qt2 library. The reason is the following:

build_ptrmemfunc_type calls finish_builtin_type.

There, (decl2, line  2308) the statement  
TYPE_STUB_DECL (type) = TYPE_NAME (type);

is not setting the common.chain to TYPE_NAME.
instead the first word of the lang_type is set to that 
pointer. But the first 64 bit of the lang types contain
bitfields like 'is_signature'.
This bitfield is evaluated in 'build_c_cast'
the line (typeck.c line 5774) 
 if (IS_SIGNATURE (type)) is sometimes true in case 
of 64 bit compiler (since is_signature is in the second 32 bit)

I don't understand enough of the frontend to fix that problem.
 
The line 
>How-To-Repeat:
gcc tt.ii -O3.

look at lang_type field of type in 'build_c_cast'
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="tt.ii"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="tt.ii"

Y2xhc3MgYW55IHsKcHVibGljOgoJaW50IGk7CiAgdm9pZCBhKGludCB4LGludCB5KXt9Owp9OwoK
Cgp0eXBlZGVmIHZvaWQgKGFueTo6KmFwKSAoaW50LGludCk7CgpzdGF0aWMgYXAgZj0wOwo=


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