Author: tkreuzer
Date: Sun Jun 28 03:33:57 2009
New Revision: 41652
URL:
http://svn.reactos.org/svn/reactos?rev=41652&view=rev
Log:
Update SERVERINFO, PFNCLIENT, PFNCLIENTWORKER to Windows 7 version, add OEMBITMAPINFO,
DPISERVERINFO, PERUSERSERVERINFO
Add -fms-extensions compilerflag to user32, win32k, csrss, win32csr.
Modified:
trunk/reactos/dll/win32/user32/misc/desktop.c
trunk/reactos/dll/win32/user32/user32.rbuild
trunk/reactos/dll/win32/user32/windows/defwnd.c
trunk/reactos/include/reactos/win32k/ntuser.h
trunk/reactos/subsystems/win32/csrss/csrss.rbuild
trunk/reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild
trunk/reactos/subsystems/win32/win32k/ntuser/metric.c
trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c
trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c
trunk/reactos/subsystems/win32/win32k/objects/stockobj.c
trunk/reactos/subsystems/win32/win32k/win32k.rbuild
Modified: trunk/reactos/dll/win32/user32/misc/desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/desk…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/desktop.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/desktop.c [iso-8859-1] Sun Jun 28 03:33:57 2009
@@ -102,7 +102,7 @@
GetConnected();
// FIXME("Global Sever Data -> %x\n",g_psi);
if (nIndex < 0 || nIndex >= SM_CMETRICS) return 0;
- return g_psi->SystemMetrics[nIndex];
+ return g_psi->aiSysMet[nIndex];
}
Modified: trunk/reactos/dll/win32/user32/user32.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/user32.rb…
==============================================================================
--- trunk/reactos/dll/win32/user32/user32.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/user32.rbuild [iso-8859-1] Sun Jun 28 03:33:57 2009
@@ -11,7 +11,7 @@
<library>win32ksys</library>
<library>pseh</library>
<library>ntdll</library>
-
+ <compilerflag compilerset="gcc">-fms-extensions</compilerflag>
<!-- See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
<directory name="include">
<pch>user32.h</pch>
Modified: trunk/reactos/dll/win32/user32/windows/defwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] Sun Jun 28 03:33:57 2009
@@ -63,7 +63,7 @@
{
if(nIndex >= 0 && nIndex < NUM_SYSCOLORS)
{
- return g_psi->SysColors[nIndex];
+ return g_psi->argbSystem[nIndex];
}
SetLastError(ERROR_INVALID_PARAMETER);
@@ -93,7 +93,7 @@
{
if(nIndex >= 0 && nIndex < NUM_SYSCOLORS)
{
- return g_psi->SysColorBrushes[nIndex];
+ return g_psi->ahbrSystem[nIndex];
}
SetLastError(ERROR_INVALID_PARAMETER);
Modified: trunk/reactos/include/reactos/win32k/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Sun Jun 28 03:33:57 2009
@@ -206,43 +206,51 @@
typedef struct _PFNCLIENT
{
- PROC pfnScrollBarC;
- PROC pfnDefWndC;
- PROC pfnMenuC;
- PROC pfnDesktopC;
- PROC pfnDefWnd1C;
- PROC pfnDefWnd2C;
- PROC pfnDefWnd3C;
- PROC pfnButtomC;
- PROC pfnComboBoxC;
- PROC pfnComboListBoxC;
- PROC pfnDefDlgC;
- PROC pfnEditC;
- PROC pfnListBoxC;
- PROC pfnMDIClientC;
- PROC pfnStaticC;
- PROC pfnImeC;
- PROC pfnHkINLPCWPSTRUCT;
- PROC pfnHkINLPCWPRETSTRUCT;
- PROC pfnDispatchHookC;
- PROC pfnDispatchDefC;
+ WNDPROC pfnScrollBarWndProc;
+ WNDPROC pfnTitleWndProc;
+ WNDPROC pfnMenuWndProc;
+ WNDPROC pfnDesktopWndProc;
+ WNDPROC pfnDefWindowProc;
+ WNDPROC pfnMessageWindowProc;
+ WNDPROC pfnSwitchWindowProc;
+ WNDPROC pfnButtonWndProc;
+ WNDPROC pfnComboBoxWndProc;
+ WNDPROC pfnComboListBoxProc;
+ WNDPROC pfnDialogWndProc;
+ WNDPROC pfnEditWndProc;
+ WNDPROC pfnListBoxWndProc;
+ WNDPROC pfnMDIClientWndProc;
+ WNDPROC pfnStaticWndProc;
+ WNDPROC pfnImeWndProc;
+ WNDPROC pfnGhostWndProc;
+ WNDPROC pfnHkINLPCWPSTRUCT;
+ WNDPROC pfnHkINLPCWPRETSTRUCT;
+ WNDPROC pfnDispatchHook;
+ WNDPROC pfnDispatchDefWindowProc;
+ WNDPROC pfnDispatchMessage;
+ WNDPROC pfnMDIActivateDlgProc;
} PFNCLIENT, *PPFNCLIENT;
typedef struct _PFNCLIENTWORKER
{
- PROC pfnButtonCW;
- PROC pfnComboBoxCW;
- PROC pfnComboListBoxCW;
- PROC pfnDefDlgCW;
- PROC pfnEditCW;
- PROC pfnListBoxCW;
- PROC pfnMDIClientCW;
- PROC pfnStaticCW;
- PROC pfnImeCW;
+ WNDPROC pfnButtonWndProc;
+ WNDPROC pfnComboBoxWndProc;
+ WNDPROC pfnComboListBoxProc;
+ WNDPROC pfnDialogWndProc;
+ WNDPROC pfnEditWndProc;
+ WNDPROC pfnListBoxWndProc;
+ WNDPROC pfnMDIClientWndProc;
+ WNDPROC pfnStaticWndProc;
+ WNDPROC pfnImeWndProc;
+ WNDPROC pfnGhostWndProc;
+ WNDPROC pfnCtfHookProc;
} PFNCLIENTWORKER, *PPFNCLIENTWORKER;
+struct _WND;
+typedef LONG_PTR (NTAPI *PFN_FNID)(struct _WND*, UINT, WPARAM, LPARAM, ULONG_PTR);
// FNID's for NtUserSetWindowFNID, NtUserMessageCall
+#define FNID_FIRST 0x029A
#define FNID_SCROLLBAR 0x029A
#define FNID_ICONTITLE 0x029B
#define FNID_MENU 0x029C
@@ -269,8 +277,10 @@
#define FNID_UNKNOWN 0x02B6
#define FNID_SENDNOTIFYMESSAGE 0x02B7
#define FNID_SENDMESSAGECALLBACK 0x02B8
-
-
+#define FNID_LAST 0x02B9
+
+#define FNID_NUM FNID_LAST - FNID_FIRST + 1
+
#define FNID_DDEML 0x2000 // Registers DDEML
#define FNID_DESTROY 0x4000 // This is sent when WM_NCDESTROY or in the support
routine.
// Seen during WM_CREATE on error exit too.
@@ -302,37 +312,106 @@
#define ICLS_NOTUSED 23
#define ICLS_END 31
+#define COLOR_LAST COLOR_MENUBAR
+#define MAX_MB_STRINGS 11
+
#define SRVINFO_METRICS 0x0020
-typedef struct _SERVERINFO
-{
- DWORD SRVINFO_Flags;
- DWORD SystemMetrics[SM_CMETRICS]; // System Metrics
- COLORREF SysColors[COLOR_MENUBAR+1]; // GetSysColor
- HBRUSH SysColorBrushes[COLOR_MENUBAR+1]; // GetSysColorBrush
- HPEN SysColorPens[COLOR_MENUBAR+1]; // ReactOS exclusive
- HBRUSH hbrGray;
- POINTL ptCursor;
- //
- DWORD cxSysFontChar;
- DWORD cySysFontChar;
- DWORD cxMsgFontChar;
- DWORD cyMsgFontChar;
- TEXTMETRICW tmSysFont;
- //
- RECTL rcScreen;
- WORD BitCount;
- WORD dmLogPixels;
- BYTE BitsPixel;
- BYTE Planes;
- WORD reserved;
- DWORD PUSIFlags; // PERUSERSERVERINFO Flags.
- ULONG uCaretWidth;
- LANGID UILangID;
- UINT LastRITWasKeyboard : 1;
- UINT bKeyboardPref : 1;
- DWORD TimeTick;
- DWORD SrvEventActivity;
+typedef struct tagOEMBITMAPINFO
+{
+ INT x;
+ INT y;
+ INT cx;
+ INT cy;
+} OEMBITMAPINFO, *POEMBITMAPINFO;
+
+typedef struct tagMBSTRING
+{
+ WCHAR szName[15];
+ UINT uID;
+ UINT uStr;
+} MBSTRING, *PMBSTRING;
+
+typedef struct tagDPISERVERINFO
+{
+ INT gclBorder; /* 000 */
+ HFONT hCaptionFont; /* 004 */
+ HFONT hMsgFont; /* 008 */
+ INT cxMsgFontChar; /* 00C */
+ INT cyMsgFontChar; /* 010 */
+ UINT wMaxBtnSize; /* 014 */
+} DPISERVERINFO, *PDPISERVERINFO;
+
+typedef struct _PERUSERSERVERINFO
+{
+ INT aiSysMet[SM_CMETRICS];
+ ULONG argbSystemUnmatched[COLOR_LAST+1];
+ COLORREF argbSystem[COLOR_LAST+1];
+ HBRUSH ahbrSystem[COLOR_LAST+1];
+ HBRUSH hbrGray;
+ POINT ptCursor;
+ POINT ptCursorReal;
+ DWORD dwLastRITEventTickCount;
+ INT nEvents;
+ UINT dtScroll;
+ UINT dtLBSearch;
+ UINT dtCaretBlink;
+ UINT ucWheelScrollLines;
+ UINT ucWheelScrollChars;
+ INT wMaxLeftOverlapChars;
+ INT wMaxRightOverlapChars;
+ INT cxSysFontChar;
+ INT cySysFontChar;
+ TEXTMETRICW tmSysFont;
+ DPISERVERINFO dpiSystem;
+ HICON hIconSmWindows;
+ HICON hIcoWindows;
+ DWORD dwKeyCache;
+ DWORD dwAsyncKeyCache;
+ ULONG cCaptures;
+ OEMBITMAPINFO oembmi[93];
+ RECT rcScreenReal;
+ USHORT BitCount;
+ USHORT dmLogPixels;
+ BYTE Planes;
+ BYTE BitsPixel;
+ ULONG PUSIFlags;
+ UINT uCaretWidth;
+ USHORT UILangID;
+ DWORD dwLastSystemRITEventTickCountUpdate;
+ ULONG adwDBGTAGFlags[35];
+ DWORD dwTagCount;
+ DWORD dwRIPFlags;
+} PERUSERSERVERINFO, *PPERUSERSERVERINFO;
+
+typedef struct tagSERVERINFO
+{
+ DWORD dwSRVIFlags;
+ ULONG_PTR cHandleEntries;
+ PFN_FNID mpFnidPfn[FNID_NUM];
+// WNDPROC aStoCidPfn[7];
+// USHORT mpFnid_serverCBWndProc[31];
+ PFNCLIENT apfnClientA;
+ PFNCLIENT apfnClientW;
+ PFNCLIENTWORKER apfnClientWorker;
+ ULONG cbHandleTable;
+ ATOM atomSysClass[ICLS_NOTUSED+1];
+ DWORD dwDefaultHeapBase;
+ DWORD dwDefaultHeapSize;
+ UINT uiShellMsg;
+ MBSTRING MBStrings[MAX_MB_STRINGS];
+ ATOM atomIconSmProp;
+ ATOM atomIconProp;
+ ATOM atomContextHelpIdProp;
+ ATOM atomFrostedWindowProp;
+ CHAR acOemToAnsi[256];
+ CHAR acAnsiToOem[256];
+ DWORD dwInstalledEventHooks;
+ PERUSERSERVERINFO;
+///////////////////////////////
+ /* Reactos specific fields */
+ DWORD SrvEventActivity;
+ HPEN SysColorPens[COLOR_MENUBAR+1];
} SERVERINFO, *PSERVERINFO;
#define CTI_INSENDMESSAGE 0x0002
@@ -407,7 +486,7 @@
MSG msgDbcsCB;
ULONG Win32ClientInfo3[28];
/* It's just a pointer reference not to be used w the structure in user space. */
- PPROCESSINFO ppi;
+ PPROCESSINFO ppi;
} CLIENTINFO, *PCLIENTINFO;
/* Make sure it fits exactly into the TEB */
@@ -444,7 +523,7 @@
DWORD recipients;
HDESK hDesk;
HWND hWnd;
- LUID luid;
+ LUID luid;
} BROADCASTPARM, *PBROADCASTPARM;
PW32THREADINFO GetW32ThreadInfo(VOID);
@@ -1774,7 +1853,7 @@
NTSTATUS
NTAPI
NtUserInitializeClientPfnArrays(
- PPFNCLIENT pfnClientA,
+ PPFNCLIENT pfnClientA,
PPFNCLIENT pfnClientW,
PPFNCLIENTWORKER pfnClientWorker,
HINSTANCE hmodUser);
Modified: trunk/reactos/subsystems/win32/csrss/csrss.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrss.rbuild [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/csrss.rbuild [iso-8859-1] Sun Jun 28 03:33:57
2009
@@ -6,6 +6,7 @@
<include base="csrss">include</include>
<include base="ReactOS">include/reactos/subsys</include>
<include base="ReactOS">include/reactos/drivers</include>
+ <compilerflag compilerset="gcc">-fms-extensions</compilerflag>
<library>nt</library>
<library>ntdll</library>
<library>smdll</library>
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild [iso-8859-1] Sun Jun 28
03:33:57 2009
@@ -7,6 +7,7 @@
<include base="ReactOS">include/reactos/subsys</include>
<include base="ReactOS">include/reactos/drivers</include>
<include base="console">.</include>
+ <compilerflag compilerset="gcc">-fms-extensions</compilerflag>
<library>ntdll</library>
<library>kernel32</library>
<library>user32</library>
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/metric.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/metric.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/metric.c [iso-8859-1] Sun Jun 28 03:33:57
2009
@@ -45,7 +45,7 @@
CurInfo = NULL;
}
- piSysMet = (INT*)gpsi->SystemMetrics;
+ piSysMet = gpsi->aiSysMet;
/* Screen sizes */
piSysMet[SM_CXSCREEN] = Width;
@@ -172,7 +172,7 @@
piSysMet[90] = 0;
#endif
- gpsi->SRVINFO_Flags |= SRVINFO_METRICS;
+ gpsi->dwSRVIFlags |= SRVINFO_METRICS;
Setup = TRUE;
if (NT_SUCCESS(Status))
@@ -193,7 +193,7 @@
/* Get metrics from array */
if (Index < SM_CMETRICS)
{
- return gpsi->SystemMetrics[Index];
+ return gpsi->aiSysMet[Index];
}
/* Handle special values */
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] Sun Jun 28
03:33:57 2009
@@ -232,7 +232,7 @@
Result = gspv.bMouseBtnSwap;
gspv.bMouseBtnSwap = Param ? TRUE : FALSE;
- gpsi->SystemMetrics[SM_SWAPBUTTON] = gspv.bMouseBtnSwap;
+ gpsi->aiSysMet[SM_SWAPBUTTON] = gspv.bMouseBtnSwap;
RETURN(Result);
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c [iso-8859-1] Sun Jun 28
03:33:57 2009
@@ -857,8 +857,8 @@
/* Verify the new values */
if (rcWorkArea.left < 0 ||
rcWorkArea.top < 0 ||
- rcWorkArea.right > gpsi->SystemMetrics[SM_CXSCREEN] ||
- rcWorkArea.bottom > gpsi->SystemMetrics[SM_CYSCREEN] ||
+ rcWorkArea.right > gpsi->aiSysMet[SM_CXSCREEN] ||
+ rcWorkArea.bottom > gpsi->aiSysMet[SM_CYSCREEN] ||
rcWorkArea.right <= rcWorkArea.left ||
rcWorkArea.bottom <= rcWorkArea.top)
return 0;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c [iso-8859-1] Sun Jun 28 03:33:57
2009
@@ -322,7 +322,7 @@
gpsi->BitCount = gpsi->Planes * gpsi->BitsPixel;
gpsi->dmLogPixels = NtGdiGetDeviceCaps(ScreenDeviceContext, LOGPIXELSY);
// Font is realized and this dc was previously set to internal DC_ATTR.
- gpsi->cxSysFontChar = IntGetCharDimensions(hSystemBM, &tmw,
&gpsi->cySysFontChar);
+ gpsi->cxSysFontChar = IntGetCharDimensions(hSystemBM, &tmw,
(DWORD*)&gpsi->cySysFontChar);
gpsi->tmSysFont = tmw;
return TRUE;
Modified: trunk/reactos/subsystems/win32/win32k/objects/stockobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/stockobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/stockobj.c [iso-8859-1] Sun Jun 28
03:33:57 2009
@@ -28,7 +28,7 @@
#include <debug.h>
-static COLORREF SysColors[] =
+static const COLORREF SysColors[] =
{
RGB(212, 208, 200), /* COLOR_SCROLLBAR */
RGB(58, 110, 165), /* COLOR_BACKGROUND */
@@ -221,8 +221,8 @@
{
if((UINT)(*Elements) < NUM_SYSCOLORS)
{
- gpsi->SysColors[*Elements] = *Colors;
- IntGdiSetSolidBrushColor(gpsi->SysColorBrushes[*Elements], *Colors);
+ gpsi->argbSystem[*Elements] = *Colors;
+ IntGdiSetSolidBrushColor(gpsi->ahbrSystem[*Elements], *Colors);
IntGdiSetSolidPenColor(gpsi->SysColorPens[*Elements], *Colors);
}
Elements++;
@@ -246,7 +246,7 @@
for(i = 0; i < nBrushes; i++)
{
- pahBrushes[i] = gpsi->SysColorBrushes[i];
+ pahBrushes[i] = gpsi->ahbrSystem[i];
}
return nBrushes > 0;
@@ -255,7 +255,7 @@
HGDIOBJ FASTCALL
IntGetSysColorBrush(INT Object)
{
- return ((Object < 0) || (NUM_SYSCOLORS <= Object)) ? NULL :
gpsi->SysColorBrushes[Object];
+ return ((Object < 0) || (NUM_SYSCOLORS <= Object)) ? NULL :
gpsi->ahbrSystem[Object];
}
BOOL FASTCALL
@@ -293,7 +293,7 @@
return FALSE;
}
- col = &gpsi->SysColors[0];
+ col = &gpsi->argbSystem[0];
for(i = 0; i < nColors; i++)
{
*(Colors++) = *(col++);
@@ -305,7 +305,7 @@
DWORD FASTCALL
IntGetSysColor(INT nIndex)
{
- return (NUM_SYSCOLORS <= (UINT)nIndex) ? 0 : gpsi->SysColors[nIndex];
+ return (NUM_SYSCOLORS <= (UINT)nIndex) ? 0 : gpsi->argbSystem[nIndex];
}
VOID FASTCALL
@@ -316,18 +316,18 @@
for(i = 0; i < NUM_SYSCOLORS; i++)
{
- gpsi->SysColors[i] = SysColors[i];
+ gpsi->argbSystem[i] = SysColors[i];
}
/* Create the syscolor brushes */
for(i = 0; i < NUM_SYSCOLORS; i++)
{
- if(gpsi->SysColorBrushes[i] == NULL)
+ if(gpsi->ahbrSystem[i] == NULL)
{
- gpsi->SysColorBrushes[i] = IntGdiCreateSolidBrush(SysColors[i]);
- if(gpsi->SysColorBrushes[i] != NULL)
+ gpsi->ahbrSystem[i] = IntGdiCreateSolidBrush(SysColors[i]);
+ if(gpsi->ahbrSystem[i] != NULL)
{
- GDIOBJ_ConvertToStockObj((HGDIOBJ*)&gpsi->SysColorBrushes[i]);
+ GDIOBJ_ConvertToStockObj((HGDIOBJ*)&gpsi->ahbrSystem[i]);
}
}
}
Modified: trunk/reactos/subsystems/win32/win32k/win32k.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/wi…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/win32k.rbuild [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/win32k.rbuild [iso-8859-1] Sun Jun 28 03:33:57
2009
@@ -9,6 +9,7 @@
<include base="freetype">include</include>
<include base="ReactOS">include/reactos/subsys</include>
<include base="ReactOS">include/reactos/drivers</include>
+ <compilerflag compilerset="gcc">-fms-extensions</compilerflag>
<define name="LANGPACK" />
<define name="_WIN32K_" />
<!-- See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269