Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.2:Update
libgcj41
force_fit_type.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File force_fit_type.patch of Package libgcj41
* stor-layout.c (set_sizetype): Set TYPE_MAX_VALUE properly for sizetype when sizetype is unsigned. Index: gcc/stor-layout.c =================================================================== *** gcc/stor-layout.c (revision 111145) --- gcc/stor-layout.c (working copy) *************** set_sizetype (tree type) *** 2018,2023 **** --- 2018,2042 ---- ssizetype = sizetype; sbitsizetype = bitsizetype; } + + /* If SIZETYPE is unsigned, we need to fix TYPE_MAX_VALUE so that + it is sign extended in a way consistent with force_fit_type. */ + if (TYPE_UNSIGNED (type)) + { + tree orig_max, new_max; + + orig_max = TYPE_MAX_VALUE (sizetype); + + /* Build a new node with the same values, but a different type. */ + new_max = build_int_cst_wide (sizetype, + TREE_INT_CST_LOW (orig_max), + TREE_INT_CST_HIGH (orig_max)); + + /* Now sign extend it using force_fit_type to ensure + consistency. */ + new_max = force_fit_type (new_max, 0, 0, 0); + TYPE_MAX_VALUE (sizetype) = new_max; + } } /* TYPE is an integral type, i.e., an INTEGRAL_TYPE, ENUMERAL_TYPE
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor