diff gcc/testsuite/c-c++-common/substring-location-PR-87721.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/c-c++-common/substring-location-PR-87721.c	Thu Feb 13 11:34:05 2020 +0900
@@ -0,0 +1,11 @@
+# define DBG_ERROR(dbg_logger, format, args...) if (1){\
+  char dbg_buffer[256]; \
+  __builtin_snprintf(dbg_buffer, sizeof(dbg_buffer)-1,\
+  __FILE__":%5d: " format  , __LINE__ , ## args); \
+};
+
+void testPasswordStore1(int argc, char **argv) {
+  const char *pw1="Secret1";
+  char pw[256];
+  DBG_ERROR(0, "Bad password, expected [%s], got [%s].", pw1, pw);
+}